Module: RailsAdmin::Config::Groupable
- Included in:
- Fields::Base
- Defined in:
- lib/rails_admin/config/groupable.rb
Instance Method Summary collapse
-
#group(name = nil) ⇒ Object
Register a group instance variable and accessor methods for objects extending the has groups mixin.
Instance Method Details
#group(name = nil) ⇒ Object
Register a group instance variable and accessor methods for objects extending the has groups mixin. The extended objects must implement reader for a parent object which includes this module.
12 13 14 15 |
# File 'lib/rails_admin/config/groupable.rb', line 12 def group(name = nil) @group = parent.group(name) unless name.nil? # setter @group ||= parent.group(:default) # getter end |