Sha256: 88016e4a022fa964298a8bf79d41aba7aef0220a103993d4849678f027623b90

Contents?: true

Size: 617 Bytes

Versions: 12

Compression:

Stored size: 617 Bytes

Contents

# frozen_string_literal: true

require 'rails_admin/config/fields/group'

module RailsAdmin
  module Config
    module Groupable
      # 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.
      #
      # @see RailsAdmin::Config::HasGroups.group
      # @see RailsAdmin::Config::Fields::Group
      def group(name = nil)
        @group = parent.group(name) unless name.nil? # setter
        @group ||= parent.group(:default) # getter
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
rails_admin-3.2.1 lib/rails_admin/config/groupable.rb
rails_admin-3.2.0 lib/rails_admin/config/groupable.rb
rails_admin-3.2.0.rc lib/rails_admin/config/groupable.rb
rails_admin-3.2.0.beta lib/rails_admin/config/groupable.rb
rails_admin-3.1.4 lib/rails_admin/config/groupable.rb
rails_admin-3.1.3 lib/rails_admin/config/groupable.rb
rails_admin-3.1.2 lib/rails_admin/config/groupable.rb
rails_admin-3.1.1 lib/rails_admin/config/groupable.rb
rails_admin-3.1.0 lib/rails_admin/config/groupable.rb
rails_admin-3.1.0.rc2 lib/rails_admin/config/groupable.rb
rails_admin-3.1.0.rc lib/rails_admin/config/groupable.rb
rails_admin-3.1.0.beta lib/rails_admin/config/groupable.rb