Class: Pliable::Ply
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Pliable::Ply
- Defined in:
- lib/pliable/ply.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.all ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/pliable/ply.rb', line 21 def self.all if current_scope current_scope.clone else if self.name == "Pliable::Ply" scope = relation else if self.try(:ply_type) scope = relation.where(otype: self.try(:ply_type)) else scope = relation end end scope.default_scoped = true scope end end |
.oldest_last_checked_time ⇒ Object
17 18 19 |
# File 'lib/pliable/ply.rb', line 17 def self.oldest_last_checked_time order('last_checked').first.last_checked end |
.ply_name(name) ⇒ Object
39 40 41 |
# File 'lib/pliable/ply.rb', line 39 def self.ply_name(name) define_singleton_method(:ply_type) { name } end |
Instance Method Details
#to_param ⇒ Object
43 44 45 |
# File 'lib/pliable/ply.rb', line 43 def to_param oid end |