Ask A Question

Notifications

You’re not receiving notifications from this thread.

RuntimeError (can't modify frozen String)

Joe Guerra asked in 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?

Reply
Reply

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

Reply

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

Reply

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

Reply

How about something like this?

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

Reply
Join the discussion
Create an account Log in

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

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

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