Sha256: 17a4f8aec5b20e1f0340879a16d5a2265344ac3dacdecaab104f30dd7a6df890

Contents?: true

Size: 380 Bytes

Versions: 21

Compression:

Stored size: 380 Bytes

Contents

module ActiveAdmin
  class Component < Arbre::HTML::Div

    # By default components render a div
    def tag_name
      'div'
    end

    def initialize(*)
      super
      add_class default_class_name
    end

    protected

    # By default, add a css class named after the ruby class
    def default_class_name
      self.class.name.demodulize.underscore
    end

  end
end

Version data entries

21 entries across 21 versions & 4 rubygems

Version Path
activeadmin-0.4.4 lib/active_admin/component.rb
activeadmin-0.4.3 lib/active_admin/component.rb
activeadmin-0.4.2 lib/active_admin/component.rb
activeadmin-0.4.1 lib/active_admin/component.rb
activeadmin-0.4.0 lib/active_admin/component.rb
andrewroth_activeadmin-0.3.4.4 lib/active_admin/component.rb
andrewroth_activeadmin-0.3.4.3 lib/active_admin/component.rb
andrewroth_activeadmin-0.3.4.2 lib/active_admin/component.rb
andrewroth_activeadmin-0.3.4.1 lib/active_admin/component.rb
andrewroth_activeadmin-0.3.4 lib/active_admin/component.rb
activeadmin-0.3.4 lib/active_admin/component.rb
activeadmin-0.3.3 lib/active_admin/component.rb
activeadmin-0.3.2 lib/active_admin/component.rb
activeadmin-0.3.1 lib/active_admin/component.rb
activeadmin-0.3.0 lib/active_admin/component.rb
nsm-activeadmin-0.2.2 lib/active_admin/component.rb
saulolso-activeadmin-0.2.2.1 lib/active_admin/component.rb
saulolso-activeadmin-0.2.2 lib/active_admin/component.rb
activeadmin-0.2.2 lib/active_admin/component.rb
activeadmin-0.2.1 lib/active_admin/component.rb