Class: Alchemy::Admin::NodeSelect

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

Instance Method Summary collapse

Constructor Details

#initialize(node = nil, url: nil, placeholder: Alchemy.t(:search_node), query_params: nil) ⇒ NodeSelect

Returns a new instance of NodeSelect.



6
7
8
9
10
11
# File 'app/components/alchemy/admin/node_select.rb', line 6

def initialize(node = nil, url: nil, placeholder: Alchemy.t(:search_node), query_params: nil)
  @node = node
  @url = url
  @placeholder = placeholder
  @query_params = query_params
end

Instance Method Details

#callObject



13
14
15
# File 'app/components/alchemy/admin/node_select.rb', line 13

def call
  ("alchemy-node-select", content, attributes)
end