Skip to content

Commit

Permalink
Replace deprecated .any? with .present?. Closes #143
Browse files Browse the repository at this point in the history
"DEPRECATION WARNING: Method any? is deprecated and will be removed in Rails 5.1, as ActionController::Parameters no longer inherits from hash. Using this deprecated behavior exposes potential security problems. If you continue to use this method you may be creating a security vulnerability in your app that can be exploited. Instead, consider using one of these documented methods which are not deprecated: http://api.rubyonrails.org/v5.0.0.rc1/classes/ActionController/Parameters.html"
  • Loading branch information
AakLak authored and ljachymczyk committed Mar 11, 2018
1 parent 20fde86 commit a087e33
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions Changes.md
@@ -1,3 +1,4 @@
- Replace deprecated .any? with .present? #143 [AakLak]
- Development environment update #140 [mizinsky]
- Fix sanitize_params method #137 [mizinsky]
- Enable to configure global remote option and it to affects sortable helper #131 [kitabatake]
Expand Down
2 changes: 1 addition & 1 deletion app/helpers/smart_listing/helper.rb
Expand Up @@ -312,7 +312,7 @@ def smart_listing_update *args
smart_listing = @smart_listings[name]

# don't update list if params are missing (prevents interfering with other lists)
if params.keys.select{|k| k.include?("smart_listing")}.any? && !params[smart_listing.base_param]
if params.keys.select{|k| k.include?("smart_listing")}.present? && !params[smart_listing.base_param]
return unless options[:force]
end

Expand Down

0 comments on commit a087e33

Please sign in to comment.