Tim Dunn wrote:
> I am wondering what code I should put inside the class of my model to do
> validations for all columns of a given data type. For example I want to
> validate whether it is a number or not if it is of type integer. I want
> to do this so I don't have to do individual validations on every column

Use validates_numericality_of :columnname

Tell your problem clearly so that we can try for solution..
-- 
Posted via http://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