Re: [Rails] Re: What is the purpose of :conditions on a belongs_to asso

2010-01-28 Thread Dave Sims
If you know of documentation in addition to the api docs linked from my original post which might be helpful, feel free to include a link. On Thu, Jan 28, 2010 at 3:47 PM, Chris Drappier wrote: > read the documentation on this. it explains it pretty thoroughly. > > On Thu, Jan 28, 2010 at 3:40 PM

Re: [Rails] Re: What is the purpose of :conditions on a belongs_to asso

2010-01-28 Thread Chris Drappier
read the documentation on this. it explains it pretty thoroughly. On Thu, Jan 28, 2010 at 3:40 PM, Dave Sims wrote: > Upon further inspection I do see that the condition will restrict the * > retrieval* of items (and even then only after they are reloaded), but not > the persistence. I can assig

Re: [Rails] Re: What is the purpose of :conditions on a belongs_to asso

2010-01-28 Thread Dave Sims
Upon further inspection I do see that the condition will restrict the * retrieval* of items (and even then only after they are reloaded), but not the persistence. I can assign an invalid object (invalid according to the condition) and that reference is persisted to the database upon save. The inval

[Rails] Re: What is the purpose of :conditions on a belongs_to asso

2010-01-28 Thread Robert Walker
Dave Sims wrote: > But the output shows no WHERE clause on the select, and in any case I > would > expect that conditions like this on a belongs_to would prevent > persisting > that relationship to begin with, on the INSERT not the SELECT. This > option > seems to have no effect on a belongs_to