The default string to join composite primary keys with in to_param.
Record that an object was destroyed, for later use by destroyed?
# File lib/sequel/plugins/active_model.rb, line 42 def after_destroy super @destroyed = true end
False if the object is new? or has been destroyed, true otherwise.
# File lib/sequel/plugins/active_model.rb, line 48 def persisted? !new? && @destroyed != true end
An array of primary key values, or nil if the object is not persisted.
# File lib/sequel/plugins/active_model.rb, line 53 def to_key if primary_key.is_a?(Symbol) [pk] if pk else pk if pk.all? end end
With the ActiveModel plugin, Sequel model objects are already compliant, so this returns self.
# File lib/sequel/plugins/active_model.rb, line 63 def to_model self end
Generated with the Darkfish Rdoc Generator 2.