[Rails-core] Proposed new ActiveRecord feature: Built-in "orphaned" scope for AR objects

2013-04-08 Thread Wes Gamble
For purposes of maintenance and data cleanup, sometimes it is helpful to determine if you have orphaned records in your AR backing store. Assuming that an AR::Base descendant has one or more belongs_to associations, I propose the addition of built-in "_orphaned" scopes that would return the set

Re: [Rails-core] Proposed new ActiveRecord feature: Built-in "orphaned" scope for AR objects

2013-04-08 Thread Wes Gamble
t left to > the author. > > -Ben > > > On Mon, Apr 8, 2013 at 2:57 PM, Wes Gamble >wrote: > >> For purposes of maintenance and data cleanup, sometimes it is helpful to >> determine if you have orphaned records in your AR backing store. >> >> As

Re: [Rails-core] Validation arguments

2013-04-11 Thread Wes Gamble
This would only be good for simple validation requirements. If there were an :if or :unless parameteron a given validation, for example, that would look kind of ugly in the one line version. Wes On 4/11/13 8:59 AM, Roman wrote: Hi, What do you think about the following way to specify validati