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 101 forks source link

The `get_policy_and_signature` method is confusing #233

Closed phaedryx closed 3 years ago

phaedryx commented 3 years ago

This method name https://github.com/filestack/filestack-rails/blob/0850f4e0a12d56bed8959e136cb241e993ea5082/app/helpers/filestack_rails/application_helper.rb#L76 makes it seem like you can do this in your view:

<% policy, signature = get_policy_and_signature %>

but the method returns [signature, policy] so that code is wrong. I would expect a method named get_policy_and_signature to return [policy, signature]

gabifija commented 3 years ago

@phaedryx Good point! Thanks for letting me know.

gabifija commented 3 years ago

@phaedryx Fixed.