forked from shell/rails3_before_render
-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
When I tried to use this gem, I got this error:
NoMethodError:
undefined method `before_render' for ReportsController:Class
Did you mean? before_filter
This is happening because bundler isn't autoloading the gem's files because the file name doesn't match the gem name. I resolved this by changing my gem line as follows:
gem "rails5_before_render", require: "before_render"
A quick solution to this would be to update the README.md with the above change.
Alternately, changing lib/before_render.rb to lib/rails5_before_render would resolve that problem too. That might cause a breaking change (for those who have already required the current file); you could keep lib/before_render.rb and have one of those two files require the other.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels