On Jan 22, 3:28 pm, Hiro Protagonist <[email protected]> wrote:

> This of course does not work with ruby because the validate method does
> not take parameters.
>
> Is metaporgramming being used?  Tnis seems like some sort of Rails
> idiom.

Not really: there are two validate methods. One is an instance method
that takes no arguments, the other is a class method that takes a
method name or block and adds it to the list of validations to run
(this is slightly hidden by the fact that that method comes from the
ActiveSupport callback stuff)

Fred
>
> Please explain.
>
> I'm trying to get back into Rails after my first attempt.
>
> TIA,
> Pete
> --
> Posted viahttp://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to