Search on the same URL by default
This commit is contained in:
@@ -1,12 +1,16 @@
|
||||
class Admin::SearchComponent < ApplicationComponent
|
||||
attr_reader :url, :label, :form_options
|
||||
attr_reader :label, :form_options
|
||||
|
||||
def initialize(url:, label:, **form_options)
|
||||
@url = url
|
||||
def initialize(label:, url: nil, **form_options)
|
||||
@label = label
|
||||
@url = url
|
||||
@form_options = form_options
|
||||
end
|
||||
|
||||
def url
|
||||
@url || request.path
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def search_terms
|
||||
|
||||
Reference in New Issue
Block a user