Skip to content

Commit

Permalink
Added predicate #active? to Integration model rather than using inexp…
Browse files Browse the repository at this point in the history
…ressive #find_by_nature.
  • Loading branch information
Aquaj committed Jun 28, 2017
1 parent 42fa1ba commit 4229989
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/models/integration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,10 @@ def parameter_keys
def name
nature.to_s.camelize
end

class << self
def active?(name)
find_by_nature(name).present?
end
end
end

0 comments on commit 4229989

Please sign in to comment.