Re: [Rails] RuntimeError (can't modify frozen String)

7 views
Skip to first unread message

Walter Lee Davis

unread,
Dec 3, 2018, 5:15:14 PM12/3/18
to rubyonra...@googlegroups.com
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 <jgu...@jginfosys.com> 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 rubyonrails-ta...@googlegroups.com.
> To post to this group, send email to rubyonra...@googlegroups.com.
> 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 all
Reply to author
Forward
0 new messages