module MagicAddresses::Translator::MoreClassMethods
M O R E - M E T H O D S # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
Public Instance Methods
search(search)
click to toggle source
# File lib/app/models/magic_addresses/translator.rb, line 41 def search(search) field = self.respond_to?(:street_name) ? :street_name : :name if search with_translations.where("#{field} LIKE ?", "%#{search}%") else with_translations end end