January 20, 2008 @ 11:31 PM
Random Rails Tidbits
With ActiveSupport::Callbacks being extracted out of ActiveRecord and ActiveSupport::Validations on the way, it looks like Josh and lifo both did a large chunk of the work I was going to do for ActiveModel.
Apparently the Russian Mafia is spreading git propaganda and speeding up the Rails routing implementation. Bravo!
The QuarkRuby folks succeeded in hacking ActiveResource to access Youtube videos. I think there may be an opportunity to tweak ActiveResource under the hood to make these sorts of plugins easier.

by Josh Peek on 21 Jan 00:39
Even though most of the ActiveModel code seems to be going into ActiveSupport, I still would like to have a ActiveModel base class.
I think ActiveModel could be the thing that gives you the Active* api with methods like create, update, save, update_attributes, and the 30 other standard methods. And the child class only has to implement a find and save to get all those nice things.
by Ritesh Arora on 21 Jan 02:39
+1 for ActiveModel concept suggested by Josh.
I would wish to see Active* api included in the ActiveResource module, especially the callbacks.
by rick on 21 Jan 07:44
I agree, that’s the plan from the start. I didn’t plan on ActiveSupport getting callbacks, but Josh proved that they were applicable in several areas.
However, it’s looking like ActiveModel will only be a series of mixins that get included, rather than enforcing a base class. It’s planned to be a ‘build-your-own-model’ toolkit.
by Jamie Orchard-Hays on 21 Jan 13:45
Rick, I think this is great. I’ve wanted something like ActiveModel for over a year but haven’t had the time/gumption/impetus to look into doing it myself.
by rick on 23 Jan 13:05
Ditto.. It’s barely started, but I only moved observers over. It’s in SVN now, but there’s nothing too exciting yet really.