crummy
crummy copied to clipboard
Rails 6.1: ActionView::Template::Error: can't modify frozen Hash
I'm trying to upgrade from Rails 6.0 to 6.1 and suddenly I'm getting this error that seems related to crummy, though I can't figure out what's wrong:
ActionView::Template::Error (can't modify frozen Hash):
1: <%= render_crumbs :last_crumb_linked => false, :format => :html_list, :ul_class => 'breadcrumb', :last_class => 'active' %>
app/views/layouts/_breadcrumbs.html.erb:1
app/views/articles/edit.html.erb:2
If I comment out the render_crumbs
call in my template then the error goes away.
Ideas?
@richardonrails
Hi, this repository has not been maintained for a long time.
Please fork the repository at https://github.com/wested/crummy and try modifying lib/crummy/standard_renderer.rb:7
as follows
- ActionView::Helpers::TagHelper::BOOLEAN_ATTRIBUTES.merge([:itemscope].to_set)
+ ActionView::Helpers::TagHelper::BOOLEAN_ATTRIBUTES.dup.merge([:itemscope].to_set)
Thank you!
For anyone else who's looking for a similar breadcrumb library that's actively maintained, I found these 2: https://github.com/piotrmurach/loaf https://github.com/weppos/breadcrumbs_on_rails