Re: RuntimeError (can't modify frozen String)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: RuntimeError (can't modify frozen String)

Joe Guerra
hmm, maybe it doesn't like this?


add_breadcrumb 'category / ' << @title, categories_path



On Monday, December 3, 2018 at 1:00:40 PM UTC-5, Joe Guerra wrote:
I got this runtime error on Heroku.  I don't know what's wrong, it has been working fine.

It's coming from my categories controller / show view. 

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/95d8e5c5-a58e-4732-97f7-4be75a8a97e3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: RuntimeError (can't modify frozen String)

Joe Guerra
Yes, that seems to have been the culprit.   I commented it out.  Is there a better way to concat the category title to the breadcrumb?

On Monday, December 3, 2018 at 1:05:14 PM UTC-5, Joe Guerra wrote:
hmm, maybe it doesn't like this?


add_breadcrumb 'category / ' << @title, categories_path



On Monday, December 3, 2018 at 1:00:40 PM UTC-5, Joe Guerra wrote:
I got this runtime error on Heroku.  I don't know what's wrong, it has been working fine.

It's coming from my categories controller / show view. 

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/1c72a6db-2107-46c9-80f6-ac47a2d27ecf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: RuntimeError (can't modify frozen String)

Walter Lee Davis
Sure. You just can't concat it like this.

add_breadcrumb ('category / ' + @title), categories_path

Or better, use "category / #{@title}" inline template syntax.

Walter

> On Dec 3, 2018, at 1:12 PM, Joe Guerra <[hidden email]> wrote:
>
> Yes, that seems to have been the culprit.   I commented it out.  Is there a better way to concat the category title to the breadcrumb?
>
> On Monday, December 3, 2018 at 1:05:14 PM UTC-5, Joe Guerra wrote:
> hmm, maybe it doesn't like this?
>
>
>
> add_breadcrumb 'category / ' << @title, categories_path
>
>
>
> On Monday, December 3, 2018 at 1:00:40 PM UTC-5, Joe Guerra wrote:
> I got this runtime error on Heroku.  I don't know what's wrong, it has been working fine.
>
> It's coming from my categories controller / show view.
>
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
> To post to this group, send email to [hidden email].
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/1c72a6db-2107-46c9-80f6-ac47a2d27ecf%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/611AEE1E-2FED-4BD7-91A9-4C9FDDBCFE5C%40wdstudio.com.
For more options, visit https://groups.google.com/d/optout.