Class: ActiveAdminAssociations::Association
- Inherits:
-
Object
- Object
- ActiveAdminAssociations::Association
- Defined in:
- lib/active_admin_associations/association.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(name, options = {}) ⇒ Association
constructor
A new instance of Association.
- #label ⇒ Object
Constructor Details
#initialize(name, options = {}) ⇒ Association
Returns a new instance of Association.
5 6 7 8 9 |
# File 'lib/active_admin_associations/association.rb', line 5 def initialize(name, = {}) @name = name @options = .symbolize_keys end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/active_admin_associations/association.rb', line 4 def name @name end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
4 5 6 |
# File 'lib/active_admin_associations/association.rb', line 4 def @options end |
Instance Method Details
#label ⇒ Object
11 12 13 |
# File 'lib/active_admin_associations/association.rb', line 11 def label @options[:as] end |