Class: ActiveRecord::Relation

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

Instance Method Summary collapse

Instance Method Details

#attributesObject



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

def attributes
  to_a.map(&:attributes)
end

#mcfly_pt(pt, cls = nil) ⇒ Object



258
259
260
261
262
# File 'lib/marty/monkey.rb', line 258

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