lib/faceted/model.rb in faceted-0.8.1 vs lib/faceted/model.rb in faceted-0.8.2
- old
+ new
@@ -11,10 +11,10 @@
def build_association_from(field)
bare_name = field.gsub(/_id$/, '')
if field =~ /_id$/
klass = eval "#{scope}#{bare_name.classify}"
- fields << bare_name
+ fields << bare_name.to_sym
define_method :"#{bare_name}" do
klass.new(:id => self.send(field))
end
end
end