Class: Alchemy::Admin::AttachmentSelect

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

Instance Method Summary collapse

Constructor Details

#initialize(attachment = nil, url: nil, placeholder: Alchemy.t("Please choose"), query_params: nil) ⇒ AttachmentSelect

Returns a new instance of AttachmentSelect.



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

def initialize(attachment = nil, url: nil, placeholder: Alchemy.t("Please choose"), query_params: nil)
  @attachment = attachment
  @url = url
  @placeholder = placeholder
  @query_params = query_params
end

Instance Method Details

#callObject



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

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