Module: Ext::Uuid::ClassMethods

Defined in:
app/models/ext.rb

Instance Method Summary collapse

Instance Method Details

#multi_find(key, includes = []) ⇒ Object



21
22
23
24
# File 'app/models/ext.rb', line 21

def multi_find(key, includes = [])
  arel = self.arel_table
  where(arel[:id].eq(key).or(arel[:uuid].eq(key))).includes(includes).first
end