-
-
Notifications
You must be signed in to change notification settings - Fork 808
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
search_field don't preserve values between requests for alias #916
Comments
I'm seeing this also |
@fidalgo @supairish Do you see this on 2.1.1 too? |
@gregmolnar I'm not sure, i'm linking to master in our Gemfile. I'll see if i have time today to try 2.1.1 |
I see this too with |
2.3.0 also has the same bug: class SomeModel < ActiveRecord::Base
ransack_alias :abc, :name_or_address_or_something_else
end
r = SomeModel.ransack({abc_cont: "xyz"})
r.abc_cont
# => nil
r.name_or_address_or_something_else_cont
# => "xyz" |
This is still an issue on latest master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi!
First of all thanks for your work 🎉
I'm using the ransack (1.8.8) with a Rails 5.1 and Ruby 2.4.3 with the following code:
Ransack alias:
ransack_alias :quick_search, :sequence_or_order_customer_name_or_order_customer_vat_identification_or_order_line_items_description
and this form:
and I need to add
value: params.dig(:q, :FIELD_NAME)
to everysearch_field
in my form, to have the values binded in the form, ie, when the results are returned and the page rendered I have the search input value filled.Where is an url example:
http://localhost:3000/invoices?utf8=%E2%9C%93&q%5Bquick_search_cont%5D=&button=&q%5Binvoice_search_cont%5D=&q%5Bperson_cont%5D=dias&q%5Bproduct_search_cont%5D=
Am I doing something wrong or there is a bug in the gem?
The text was updated successfully, but these errors were encountered: