search
top

Probably watching too many RoR demos lately

Not sure why, but this ActiveRecord thing appealed to me and so i wrote a short behavior (nothing to release, really..) that kinda emulates RoR a little more… However, i think this is something for the bin. Or does anyone see a need or benefit of something like this:

$this->User->find('first');
pr ($this->User->record); // has the full record

$this->User->record->username = 'BlaBlubb';
$this->User->record->email = 'bla@blubb.com';
$this->User->save(); // saves full record 

$this->User->find('first');
pr ($this->User->record); // jup, that worked.

Useful? hmm.. maybe. It was fun to explore though. If you are interested in the Behavior, i’ve put it into a gist.

3 Responses to “Probably watching too many RoR demos lately”

  1. Joel Moss says:

    I’m pretty sure that this s what we will be doing in 2.0!

  2. Daniel H. says:

    looks nice, but it’s actually a fake. sorry that this has to be the first post, but please use (try out) rails/merb or zend (if you prefer php) for real objects.

  3. Daniel H. says:

    3 minutes :) argh … the second post :)

Leave a Reply

top