Module: Cms::Behaviors::Connecting::MacroMethods
- Defined in:
- lib/cms/behaviors/connecting.rb
Instance Method Summary collapse
Instance Method Details
#connectable? ⇒ Boolean
14 15 16 |
# File 'lib/cms/behaviors/connecting.rb', line 14 def connectable? !!@is_connectable end |
#is_connectable(options = {}) ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/cms/behaviors/connecting.rb', line 18 def is_connectable(={}) @is_connectable = true extend ClassMethods include InstanceMethods attr_accessor :connect_to_page_id, :connect_to_container, :connected_page #attr_accessible :connect_to_page_id, :connect_to_container,:connected_page has_many :connectors, :as => :connectable, :class_name => 'Cms::Connector' attr_accessor :updated_by_page after_create :connect_to_page after_save :update_connected_pages, :unless => :skip_callbacks end |