[Nitro] OG vs Active Record
Jonathan Buch
john at oxyliquit.de
Mon Aug 20 06:52:05 EDT 2007
On Sun, 19 Aug 2007 23:43:31 +0200, George Moschovitis <george.moschovitis at gmail.com> wrote:
>>
>> This certainly could be done and it has been asked for already on irc
>> some year ago. I wasn't too sure about that back then, and I still
>> hesitate on that. We could make it an option, `Og.auto_validations`
>> which then does the trick.... G?
>>
>
> I don't understand what you mean here, can you elaborate?
Og.auto_validations = true
class User
attr_accessor :name, String, :uniq => true
end
This would then automatically create a `validate_unique :name`.
Similar with other annotations then, :primary_key would do that too..
It could just 'walk' through some filter in the enchanting,
which just reacts on certain annotations and autocreates validations..
Just an idea though. :)
Jo
--
Feel the love
http://pinkjuice.com/pics/ruby.png
More information about the Nitro-general
mailing list