New Discussion

Notifications

You’re not receiving notifications from this thread.

RuntimeError (can't modify frozen String)

5
Rails

got this runtime error on heroku, it had been working fine...

I traced it down to this

add_breadcrumb 'category / ' << @title, categories_path

in my category controller (I've commented it out for now). Is there an alternative way to concat this so it doesn't cause an error?

yes, i'm using that gem. Just stopped liking the way I concatenated the breadcrumb.

What should add_breadcrumb 'category / ' << @title, categories_path output?

it should add / category / + category title to my breadcrumb.

How about something like this?

add_breadcrumb "category / #{@title}", categories_path

Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 88,834+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.