Sha256: 5c994b42a4f23310fd67d7ec1646bb41e05d101771fecf123140954e408efd5f
Contents?: true
Size: 820 Bytes
Versions: 3
Compression:
Stored size: 820 Bytes
Contents
module Gluttonberg class Repeater < ActiveRecord::Base self.table_name = "gb_repeater" belongs_to :itemable, :polymorphic => true belongs_to :repeatable, :polymorphic => true attr_accessible :itemable, :itemable_id, :itemable_type attr_accessible :repeatable, :repeatable_type, :repeatable_id attr_accessible :title attr_accessible :position # Included mixins which are registered by host app for extending functionality MixinManager.load_mixins(self) def duplicate!(dup_repeatable) @cloned_repeater = self.dup @cloned_repeater.position = nil @cloned_repeater.created_at = Time.now @cloned_repeater.repeatable = dup_repeatable if @cloned_repeater.save @cloned_repeater else return nil end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
gluttonberg-core-3.0.2 | app/models/gluttonberg/repeater.rb |
gluttonberg-core-3.0.1 | app/models/gluttonberg/repeater.rb |
gluttonberg-core-3.0.0 | app/models/gluttonberg/repeater.rb |