-
Notifications
You must be signed in to change notification settings - Fork 102
Make Policy & FilepickerImageUrl public constants #133
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
Make Policy & FilepickerImageUrl public constants #133
Conversation
Hi @rupurt thanks for your PR. About the What you think about it? |
@maurogeorge sounds good. How do I update the RDocs? |
Hi @rupurt take a look at this example https://github.com/Ink/filepicker-rails/blob/master/app/helpers/filepicker_rails/form_helper.rb#L6-L43 you need to update in the code and later this is released on the Rubydoc. |
Great, thanks. |
@maurogeorge how does that look? I wasn't sure how to document multiple arguments so I looked at how the Capybara project does it, they use |
e566243
to
a5d8236
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please format the HTML? Like
<html>
<head>
<meta name="fp-policy" content='<%= FilepickerRails::Policy.apply.to_json.html_safe %>' />
</head>
<body>
</body>
</html>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@rupurt thanks a lot for your PR ❤️ |
@maurogeorge sorry I haven't had a chance to add the fixes. I'm aiming to block off some time this week. |
@rupurt no problem 😄 |
- this method does not exist in ActionController::API
a5d8236
to
11a97d4
Compare
1 similar comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any word on when this will be merged into master and an updated gem will be released?
Why didn't this get merged? Edit I've been maintaining a fork of this gem ever since you guys took the Policy API private, it would be nice to not have to do that anymore. |
As we are reworking this gem, this PR is unfortunately no longer compatible. However, I will be including this feature in the new release. I am closing this for now. |
Howdy,
Thanks for the great work on the gem. It's proved very useful, however we're running into a couple of encapsulation limitations when trying to use policies.
Our use cases for making the above public are:
Policy
: We have a javascript heavy app that cannot use thefilepicker_field
helper. We use the Filepicker JS api but don't want to re-implement the work of thePolicy
class for asset security. We would like to render the policy and signature into the initial html of the page using thePolicy
class and read those values in JS.FilepickerImageUrl
: We have a background job that sends the uploaded file to BoxView for document & presentation HTML5 conversion. We would prefer to use the url generation class directly instead of mixing in Rails helpers.