Class: ActiveRecord::Relation

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

Instance Method Summary collapse

Instance Method Details

#attributesObject



268
269
270
# File 'lib/marty/monkey.rb', line 268

def attributes
  to_a.map(&:attributes)
end

#mcfly_pt(pt, cls = nil) ⇒ Object



262
263
264
265
266
# File 'lib/marty/monkey.rb', line 262

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