Class: Alchemy::Admin::PageSelect

Inherits:
ViewComponent::Base
  • Object
show all
Defined in:
app/components/alchemy/admin/page_select.rb

Instance Method Summary collapse

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

#callObject



14
15
16
17
18
# File 'app/components/alchemy/admin/page_select.rb', line 14

def call
  ("alchemy-page-select", attributes) do
    stylesheet_link_tag("alchemy/admin/page-select") + content
  end
end