You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if i use a search field targeting multiple fields in a belongs_to association (like described in the documentation) i will get an "undefined method" error for "Ransack::Search<class: Customer, base: Grouping <combinator: and>>:Ransack::Search".
Suppose you have the following models:
class Customer < ApplicationRecord
belongs_to :address, optional: true
end
class Address < ApplicationRecord
has_many :customers, dependent: :nullify
# this model has the attributes street_and_number, city, zip_code and country
end
undefined method `address_city_or_address_zip_code_or_address_country_cont' for Ransack::Search<class: Customer, base: Grouping <combinator: and>>:Ransack::Search
This seems to be only an issue for belongs_to associations. For has_many associations, this works fine. (For sure by using "addresses" instead of "address").
Thank you for help :)
The text was updated successfully, but these errors were encountered:
Hey all,
if i use a search field targeting multiple fields in a belongs_to association (like described in the documentation) i will get an "undefined method" error for "Ransack::Search<class: Customer, base: Grouping <combinator: and>>:Ransack::Search".
Suppose you have the following models:
Now if i submit the following search form:
I will get the following error:
This seems to be only an issue for belongs_to associations. For has_many associations, this works fine. (For sure by using "addresses" instead of "address").
Thank you for help :)
The text was updated successfully, but these errors were encountered: