Skip to content

Commit

Permalink
fix(activemeta/rule): #opts method stricly check if the last argument…
Browse files Browse the repository at this point in the history
… is a Hash
  • Loading branch information
mehdi-farsi committed Dec 2, 2015
1 parent 103c328 commit f569987
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/active_meta/rule.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def metaclass
end

def opts
Hash.try_convert(arguments.last) || {}
arguments.last && arguments.last.is_a?(Hash) ? arguments.last : {}
end

def validates_context?
Expand Down

0 comments on commit f569987

Please sign in to comment.