I've discovered extremely annoying bug that is causing active record models to misbehave. If model defines setter methods that change values that are passed, the processed values are reverted back to original values (in new or build assoc methods) by your gem (all logic in setter method is discarded).
For example:
class User
def email=(value)
value = value.strip
write_attribute(:email, value)
end
end
u = User.new(:email => ' asfd@asdf.com ')
u.email # will return ' asfd@asdf.com ', but should return 'asfd@asdf.com'
Please accept one line fix pull request, which also contains rspec.
Hi Jeff,
I've discovered extremely annoying bug that is causing active record models to misbehave. If model defines setter methods that change values that are passed, the processed values are reverted back to original values (in new or build assoc methods) by your gem (all logic in setter method is discarded). For example:
Please accept one line fix pull request, which also contains rspec.
Regards, Alex