-
-
Save ljercha/73d05df21a0f699661d5 to your computer and use it in GitHub Desktop.
Search by name foreign key
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Meal < ActiveRecord::Base | |
has_one :dish | |
self.per_page = 10 | |
searchable do | |
text :date | |
integer :dish_id # here I wanna search by dish.name | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment