Class: Alchemy::Admin::PageSelect
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- Alchemy::Admin::PageSelect
- Defined in:
- app/components/alchemy/admin/page_select.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(page = nil, url: nil, allow_clear: false, placeholder: Alchemy.t(:search_page), query_params: nil) ⇒ PageSelect
constructor
A new instance of PageSelect.
Constructor Details
#initialize(page = nil, url: nil, allow_clear: false, placeholder: Alchemy.t(:search_page), query_params: nil) ⇒ PageSelect
Returns a new instance of PageSelect.
6 7 8 9 10 11 12 |
# File 'app/components/alchemy/admin/page_select.rb', line 6 def initialize(page = nil, url: nil, allow_clear: false, placeholder: Alchemy.t(:search_page), query_params: nil) @page = page @url = url @allow_clear = allow_clear @placeholder = placeholder @query_params = query_params end |
Instance Method Details
#call ⇒ Object
14 15 16 17 18 |
# File 'app/components/alchemy/admin/page_select.rb', line 14 def call content_tag("alchemy-page-select", attributes) do stylesheet_link_tag("alchemy/admin/page-select") + content end end |