Class: ActiveAdmin::Component
- Defined in:
- lib/active_admin/component.rb
Direct Known Subclasses
Views::ActionItems, Views::AttributesTable, Views::BlankSlate, Views::Column, Views::Columns, Views::IndexAsBlock, Views::IndexAsBlog, Views::IndexAsGrid, Views::IndexAsTable, Views::PaginatedCollection, Views::Panel, Views::Scopes, Views::StatusTag
Instance Method Summary collapse
-
#default_class_name ⇒ Object
protected
By default, add a css class named after the ruby class.
-
#initialize ⇒ Component
constructor
A new instance of Component.
-
#tag_name ⇒ Object
By default components render a div.
Constructor Details
#initialize ⇒ Component
Returns a new instance of Component.
9 10 11 12 |
# File 'lib/active_admin/component.rb', line 9 def initialize(*) super add_class default_class_name end |
Instance Method Details
#default_class_name ⇒ Object (protected)
By default, add a css class named after the ruby class
17 18 19 |
# File 'lib/active_admin/component.rb', line 17 def default_class_name self.class.name.demodulize.underscore end |
#tag_name ⇒ Object
By default components render a div
5 6 7 |
# File 'lib/active_admin/component.rb', line 5 def tag_name 'div' end |