On Tue, Dec 15, 2009 at 9:32 AM, radu puspana <[email protected]> wrote:
> sry folks, i forgot to put up the  link, sry my bad :
> http://ryandaigle.com/articles/2009/8/11/what-s-new-in-edge-rails-independent-model-validators
> thx to Leonardo Mateo for answering, and i would like the next
> response if it comes, to be a well explained one,
>i;m a RoR noob :( ,
That means that you're starting to walk the right way, and that's no
reason to :(, so be :)

> like, if i put the code in the lib/ should i create a file or somentih
> with that class, and how should i link it with the validator in my
> model??
Of course you should create a file, you can't just throw the code in a
directory unless it is on a file. :P
After that you should make sure that file is 'required' before you try
to use it. For this you can require it on the model you're going to
use it or, you can require it on application.rb for it to be available
for all the models. That will depend on your desing.

Hope it helps.

-- 
Leonardo Mateo.
There's no place like ~

--

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