Skip to content

Commit

Permalink
Add call for clarity when running a lambda/proc.
Browse files Browse the repository at this point in the history
  • Loading branch information
lgebhardt committed Dec 3, 2015
1 parent 74bf36c commit 8cb339a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/jsonapi/resource.rb
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ def apply_filter(records, filter, value, options = {})
strategy = _allowed_filters.fetch(filter.to_sym, Hash.new)[:apply]

if strategy
strategy.(records, value, options)
strategy.call(records, value, options)
else
records.where(filter => value)
end
Expand Down Expand Up @@ -597,7 +597,7 @@ def verify_filter(filter, raw, context = nil)
strategy = _allowed_filters.fetch(filter, Hash.new)[:verify]

if strategy
[filter, strategy.(filter_values, context)]
[filter, strategy.call(filter_values, context)]
else
if is_filter_relationship?(filter)
verify_relationship_filter(filter, filter_values, context)
Expand Down

0 comments on commit 8cb339a

Please sign in to comment.