Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rails 6.1: ActionView::Template::Error: can't modify frozen Hash #71

Open
richardonrails opened this issue Apr 2, 2021 · 2 comments
Open

Comments

@richardonrails
Copy link

richardonrails commented Apr 2, 2021

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?

@rhiroe
Copy link

rhiroe commented May 14, 2021

@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)

@richardonrails
Copy link
Author

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

shivang2056 added a commit to cloudlogistics/crummy that referenced this issue Oct 31, 2023
shivang2056 added a commit to cloudlogistics/crummy that referenced this issue May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants