Skip to content

Commit

Permalink
Only search for predicate once
Browse files Browse the repository at this point in the history
  • Loading branch information
Will Spurgin authored and wspurgin committed Nov 8, 2017
1 parent fb2a38a commit ab9ca47
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/active_admin/filters/active_filter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ def related_primary_key
end

def predicate_association
@predicate_association ||= find_predicate_association
@predicate_association = find_predicate_association unless defined?(@predicate_association)
@predicate_association
end

private
Expand Down

0 comments on commit ab9ca47

Please sign in to comment.