filestack / filestack-rails

Official Ruby on Rails plugin for Filestack File Picker that makes it easy to add powerful file uploading and transformation capabilities to any web or mobile application.
https://www.filestack.com
Apache License 2.0
223 stars 102 forks source link

The `attr_reader` called `method` in `form_helper.rb` seems to break Ruby `&method(..)` idiom in helpers #161

Closed phobetron closed 7 years ago

phobetron commented 7 years ago

I ran across this very annoying and esoteric bug, where after upgrading from the old filepicker-rails, random methods started breaking in my helper files.

Please rename the method attribute in form_helper.rb to something less dangerous?

To test, try to use the &method(:method_name) idiom in a helper in a project that uses the filestack-rails gem.

(For more info regarding the idiom: https://andrewjgrimm.wordpress.com/2011/10/03/in-ruby-method-passes-you/)

staturecrane commented 7 years ago

@phobetron Thank you for bringing this up. This gem is currently being revamped and we will be sure to address this issue.

staturecrane commented 7 years ago

@phobetron We have released a new version of the plugin, and I was careful to ensure this issue was not replicated. However, there is another minor namespace issue related to a dependency, which you can see here #168. It is being addressed and will be fixed shortly, and please read through the Readme and the included migration guide before upgrading.