Claudio Poli wrote:
> hi everyone,
> in this http://pastie.org/271218 example I'm going to do some basic
> stuff.
> 
> I'm trying to add an existing object to a collection; the issue here
> is that :on => :create fires not only on Reason create but even when
> adding a Reason to a collection.
> 
> I was thinking that it should be scoped/isolated Reason objects.
> 
> Any thoughts about this behaviour?

It's certainly counter-intuitive and looks like a bug to me.

Is it a has_many :through association you're using?  If so it's probably
because the 'through model' is being :create d and the validations are
looking at that instead of the lifecycle of the Reason object.
-- 
Cheers,

Koz

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to