Class: FlexiAdmin::Components::Resource::ViewComponent
- Inherits:
-
BaseComponent
- Object
- ViewComponent::Base
- BaseComponent
- FlexiAdmin::Components::Resource::ViewComponent
- Includes:
- Helpers::ActionHelper, Helpers::ResourceHelper
- Defined in:
- lib/flexi_admin/components/resource/view_component.rb
Instance Attribute Summary collapse
-
#context ⇒ Object
readonly
Returns the value of attribute context.
-
#resource ⇒ Object
readonly
Returns the value of attribute resource.
Instance Method Summary collapse
- #divider ⇒ Object
-
#initialize(context) ⇒ ViewComponent
constructor
A new instance of ViewComponent.
Methods included from Helpers::ActionHelper
Methods included from Helpers::ResourceHelper
#autocomplete_path, #bulk_action_path, #datalist_path, #edit_resource_path, #paginate, #resource__path, #resource_input_name, #resource_path, #resources_path, #scope, #scope_plural, #scope_singular
Constructor Details
#initialize(context) ⇒ ViewComponent
Returns a new instance of ViewComponent.
13 14 15 16 |
# File 'lib/flexi_admin/components/resource/view_component.rb', line 13 def initialize(context) @context = context @resource = context.resource end |
Instance Attribute Details
#context ⇒ Object (readonly)
Returns the value of attribute context.
8 9 10 |
# File 'lib/flexi_admin/components/resource/view_component.rb', line 8 def context @context end |
#resource ⇒ Object (readonly)
Returns the value of attribute resource.
8 9 10 |
# File 'lib/flexi_admin/components/resource/view_component.rb', line 8 def resource @resource end |
Instance Method Details
#divider ⇒ Object
18 19 20 |
# File 'lib/flexi_admin/components/resource/view_component.rb', line 18 def divider content_tag :div, "", class: "dropdown-divider" end |