lib/test_dummy/support.rb in test_dummy-0.4.0 vs lib/test_dummy/support.rb in test_dummy-0.5.0
- old
+ new
@@ -31,10 +31,10 @@
(reflection.respond_to?(:foreign_key) ? reflection.foreign_key : reflection.primary_key_name).to_sym
]
elsif (model_class.respond_to?(:association_reflection) and reflection = model_class.association_reflection(attribute))
[
reflection[:associated_class],
- reflection[:key] || :"#{attribute.to_s.underscore}_id"
+ (reflection[:key] || "#{attribute.to_s.underscore}_id").to_sym
]
end
end
end