Class: Avo::Index::Ordering::ButtonsComponent

Inherits:
BaseComponent
  • Object
show all
Defined in:
app/components/avo/index/ordering/buttons_component.rb

Instance Method Summary collapse

Constructor Details

#initialize(resource: nil, reflection: nil, view_type: nil) ⇒ ButtonsComponent

Returns a new instance of ButtonsComponent.



4
5
6
7
8
# File 'app/components/avo/index/ordering/buttons_component.rb', line 4

def initialize(resource: nil, reflection: nil, view_type: nil)
  @resource = resource
  @reflection = reflection
  @view_type = view_type
end

Instance Method Details

#render?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'app/components/avo/index/ordering/buttons_component.rb', line 10

def render?
  has_with_trial(:resource_ordering) && can_order_any? && view_type_is_table? && enabled_in_view?
end