Use == || == instead of include?

This commit is contained in:
Santiago Pastorino 2013-05-15 16:14:27 -07:00
parent eb5b27de69
commit ecbb8bf6a6

View File

@ -18,11 +18,11 @@ module ActiveModel
alias :embed_in_root? :embed_in_root
def embed_ids?
[:id, :ids].include? embed
embed == :id || embed == :ids
end
def embed_objects?
[:object, :objects].include? embed
embed == :object || embed == :objects
end
def embeddable?