Class: Alchemy::Admin::Resource::SelectFilter
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- Alchemy::Admin::Resource::SelectFilter
- Defined in:
- app/components/alchemy/admin/resource/select_filter.rb
Instance Attribute Summary collapse
-
#include_blank ⇒ Object
readonly
Returns the value of attribute include_blank.
-
#label ⇒ Object
readonly
Returns the value of attribute label.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#resource_name ⇒ Object
readonly
Returns the value of attribute resource_name.
-
#selected ⇒ Object
readonly
Returns the value of attribute selected.
Instance Method Summary collapse
-
#initialize(name:, resource_name:, label:, include_blank:, options:, params:) ⇒ SelectFilter
constructor
A new instance of SelectFilter.
Constructor Details
#initialize(name:, resource_name:, label:, include_blank:, options:, params:) ⇒ SelectFilter
Returns a new instance of SelectFilter.
22 23 24 25 26 27 28 29 |
# File 'app/components/alchemy/admin/resource/select_filter.rb', line 22 def initialize(name:, resource_name:, label:, include_blank:, options:, params:) @name = name = @label = label @include_blank = include_blank @resource_name = resource_name @selected = get_selected_value_from(params) end |
Instance Attribute Details
#include_blank ⇒ Object (readonly)
Returns the value of attribute include_blank.
7 8 9 |
# File 'app/components/alchemy/admin/resource/select_filter.rb', line 7 def include_blank @include_blank end |
#label ⇒ Object (readonly)
Returns the value of attribute label.
7 8 9 |
# File 'app/components/alchemy/admin/resource/select_filter.rb', line 7 def label @label end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
7 8 9 |
# File 'app/components/alchemy/admin/resource/select_filter.rb', line 7 def name @name end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
7 8 9 |
# File 'app/components/alchemy/admin/resource/select_filter.rb', line 7 def end |
#resource_name ⇒ Object (readonly)
Returns the value of attribute resource_name.
7 8 9 |
# File 'app/components/alchemy/admin/resource/select_filter.rb', line 7 def resource_name @resource_name end |
#selected ⇒ Object (readonly)
Returns the value of attribute selected.
7 8 9 |
# File 'app/components/alchemy/admin/resource/select_filter.rb', line 7 def selected @selected end |