[ANN] Dr Nic’s Magic Models 0.8 - Validate Anything

In the first run of the sell-out Magic Models - “I can’t believe its an
ActiveRecord” - Super Show - you were amazed as we stripped away the
necessary essentials of an ActiveRecord - right in front of your eyes -
the necessary became unnecessary.

We removed the validates_presence_of validations… and the Magic Model
still validated.

We removed the has_many, belongs_to, and has_many :through associations…
and the Magic Model still associated.

We removed the actual class definition itself - the very thing that
provides the ActiveRecord CRUD layer… and the Magic Model still CRUDded.

In the new Magic Models, Virtual Validations get Virtuous!

g = Group.new
g.name = "x" * 51

=> "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx”

g.valid?

=> false

g.errors.full_messages

=> ["Name is too long (maximum is 50 characters)"]

All this and more in 0.8.0 of Dr Nic's Magic Models
http://drnicwilliams.com/2006/09/21/dr-nic-magic-models-validate-anything-anytime-anywhere/

Its magic like this that makes programming fun :slight_smile:

···

--
Posted via http://www.ruby-forum.com/\.

In the first run of the sell-out Magic Models - "I can't believe its an
ActiveRecord" - Super Show - you were amazed as we stripped away the
necessary essentials of an ActiveRecord - right in front of your eyes -
the necessary became unnecessary.

We removed the validates_presence_of validations… and the Magic Model
still validated.

We removed the has_many, belongs_to, and has_many :through associations…
and the Magic Model still associated.

We removed the actual class definition itself - the very thing that
provides the ActiveRecord CRUD layer… and the Magic Model still CRUDded.

...

Its magic like this that makes programming fun :slight_smile:

You don't happen to be the guy in the white jacket in those new Hummer
H3 ads are you? <G>

···

On 9/21/06, Dr Nic <drnicwilliams@gmail.com> wrote:

--
Rick DeNatale

My blog on Ruby
http://talklikeaduck.denhaven2.com/

You don't happen to be the guy in the white jacket in those new Hummer
H3 ads are you? <G>

I can't confirm or deny. Got a link to the ad on youtube or somewhere?

···

--
Posted via http://www.ruby-forum.com/\.

Sorry, I've only seen it on TeeVee.

···

On 9/21/06, Dr Nic <drnicwilliams@gmail.com> wrote:

> You don't happen to be the guy in the white jacket in those new Hummer
> H3 ads are you? <G>

I can't confirm or deny. Got a link to the ad on youtube or somewhere?

--
Rick DeNatale

My blog on Ruby
http://talklikeaduck.denhaven2.com/