Class: Comable::NavigationItem
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Comable::NavigationItem
- Includes:
- Linkable
- Defined in:
- app/models/comable/navigation_item.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.linkable_id_options(type) ⇒ Object
25 26 27 28 |
# File 'app/models/comable/navigation_item.rb', line 25 def (type) params = linkable_params(type) params ? params[:linkable_id_options] : [[]] end |
.linkable_params_lists ⇒ Object
17 18 19 20 21 22 23 |
# File 'app/models/comable/navigation_item.rb', line 17 def linkable_params_lists [ web_address_linkable_params, # Web Address product_linkable_params, # Product page_linkable_params # Page ].compact end |
Instance Method Details
#linkable_class ⇒ Object
63 64 65 |
# File 'app/models/comable/navigation_item.rb', line 63 def linkable_class linkable_type.constantize if linkable_type.present? end |
#linkable_exists? ⇒ Boolean
71 72 73 |
# File 'app/models/comable/navigation_item.rb', line 71 def linkable_exists? .all?(&:present?) end |
#linkable_id_options ⇒ Object
67 68 69 |
# File 'app/models/comable/navigation_item.rb', line 67 def self.class.(linkable_type) end |