Class: Adminable::Attributes::Types::HasMany
- Includes:
- Association
- Defined in:
- lib/adminable/attributes/types/has_many.rb
Instance Attribute Summary
Attributes included from Association
#association, #options_for_select
Attributes inherited from Base
#center, #name, #ransack_name, #required, #show, #wysiwyg
Instance Method Summary collapse
Methods inherited from Base
#form_partial_path, #index_partial_path, #initialize, #type
Constructor Details
This class inherits a constructor from Adminable::Attributes::Base
Instance Method Details
#key ⇒ Object
7 8 9 |
# File 'lib/adminable/attributes/types/has_many.rb', line 7 def key @key = "#{@name.to_s.singularize}_ids" end |
#show? ⇒ Boolean
15 16 17 |
# File 'lib/adminable/attributes/types/has_many.rb', line 15 def show? @association.klass.any? end |
#strong_parameter ⇒ Object
11 12 13 |
# File 'lib/adminable/attributes/types/has_many.rb', line 11 def strong_parameter { key => [] } end |