Andrew Butvin
2007-Jul-12 10:54 UTC
[Ferret-talk] is it possible to get id of the matched field?
i want to create link on the matched field: f.e. i have person and phone models. class Person < ActiveRecord::Base has_many :phones acts_as_ferret :fields => [:phone_numbers] def phone_numbers phones.collect{|phone| phone.number} end end search result''s page lists out people with matched phone_numbers highlighted. i want to create link on matched phone_number to get edit_phone page, for instance. So I have to get the id of the phone with matched phone_number. is there any opportunity to do it without another search in (additional) phones index? -- Posted via http://www.ruby-forum.com/.