gemoji
gemoji copied to clipboard
image_path with sprockets-rails 3.2.0 / Rails 5.1.1
Hi we recently upgraded to Rails 5.1.1 and sprockets-rails 3.2.0 and saw an issue with the emojify helper you guys suggest. sprockets-rails 3.2.0 requires you to to explicitly tell the image_path
helper if you'd like it to skip the asset pipeline and use the public/
folder.
https://github.com/rails/rails/issues/29535 https://www.schneems.com/2016/11/21/writing-a-rails-feature-blow-by-blow/
Not sure what the best way to update the instructions would be but happy to open a PR.
Thanks for letting us know!
I'm not sure what the correct approach should be, either. We could use method(:image_path).arity
to detect the number of arguments to image_path
and thus pass a special parameter for Rails 5.1.1 where it's needed, and not pass it for older versions. Do you think this would work? We'd welcome a PR.
Closing because this isn't a huge issue and I'm not enough of a Rails expert to fix this myself, but contributions are still welcome.