Greetings,

At RailsConf Europe 2008, I spent some time playing with my own
implementation of ActiveModel. Most of the validations stuff has been
implemented now, so I think it's ready to be shared with the
community.

http://github.com/leethal/activemodel/tree/master

I have not yet tried to integrate this into ActiveRecord (yet). Doing
so is probably quite a lot of work (deprecations etc.), and if it's
done now, it probably has to be re-done by the time of deciding to
actually implement it in the master branch (be it my implementation or
someone elses).

Some notes:

* After talking to DHH on the mentioned RailsConf and showing him my
ActiveModel implementation at the state it was in at that time, he
suggested having a system to hook your own validation methods in a way
that made sure they were available to all libraries using
ActiveModel::Validations. I have implemented this with the
ActiveModel::Validations.add method.
* It does not use the L18n library for validation messages, for no
particular reason. It doesn't really matter at this point, I guess,
and as far as I know, all it takes is adding a .t to the strings.
* The validations sort of implement it's own callback system as of
now. It should probably rely on ActiveModel::Callbacks instead.

--~--~---------~--~----~------------~-------~--~----~
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 rubyonrails-core@googlegroups.com
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