-
Notifications
You must be signed in to change notification settings - Fork 141
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
Fix sanitize_params method #137
Conversation
Is this fixing #134? |
@Ana06 yes, this permit only smart-listing params. |
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.
I think we still need to use if params.respond_to?(:permit!)
just to handle Rails versions without strong parameters.
Also, in case we use strong parameters, I don't think we need to use UNSAFE_PARAMS
any more (needs verification).
I changed the approach, and there is no 'permit' method now. |
README.md
Outdated
@@ -238,8 +238,9 @@ When form field changes its value, form is submitted and request is made. This n | |||
```ruby | |||
users_scope = User.active.joins(:stats) | |||
users_scope = users_scope.like(params[:filter]) if params[:filter] | |||
@users = smart_listing_create :users, users_scope, partial: "users/listing" | |||
@users = smart_listing_create :users, users_scope, partial: "users/listing", custom_params: [:filter] |
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.
@mizinsky is this still valid?
Thanks @mizinsky |
* sology/master: Version bump. Remove duplicated href key from config template. Closes Sology#146 Replace deprecated .any? with .present?. Closes Sology#143 Update Dummy and Dev Environment to Rails 5.1. Closes Sology#140 Fix sanitize_params method. Closes Sology#137 Enable to configure global remote option. Closes Sology#131 Kaminari update. Closes Sology#139 Update Readme for Rails >= 5.1 Users Version bump. Fix indentation. Closes Sology#130 Use #empty? for AC::Params. Closes Sology#122 Add support for Turbolinks 5. Closes Sology#117 Fix Kaminari #num_pages deprecation warning. Closes Sology#115 Allow boostrap 4 compatibility. Closes Sology#114 Use id.to_json so integers and uuids will both work. Closes Sology#113 Fixing documentation for filter search icon to be displayed correctly. Allow to render outside of controllers. Closes Sology#106 Update Gemfile.lock Version bump to 1.2.0 Fix handling view arguments.
Permit only @smart_listing params.