Class: ActiveRecord::Relation

Inherits:
Object
  • Object
show all
Defined in:
lib/marty/monkey.rb

Instance Method Summary collapse

Instance Method Details

#attributesObject



185
186
187
# File 'lib/marty/monkey.rb', line 185

def attributes
  to_a.map(&:attributes)
end

#mcfly_pt(pt, cls = nil) ⇒ Object



179
180
181
182
183
# File 'lib/marty/monkey.rb', line 179

def mcfly_pt(pt, cls=nil)
  cls ||= self.klass
  tb = cls.table_name
  self.where("#{tb}.obsoleted_dt >= ? AND #{tb}.created_dt < ?", pt, pt)
end