Re: [Rails] How can I conditional the validation on a model validation?

2010-03-14 Thread Anthony Gardner
If you're asking how do I avoid the validation check on name and id when updating, then you should look at :on = params for validation. validates_presence_of :id, :name, :on = :create I think everything is clearly explained in the docs.

[Rails] How can I conditional the validation on a model validation?

2010-03-13 Thread Jorge alejandro Mendoza torres
I'm making an application in Ruby, but I create records from text files, which contain basic information to create a record. Then I modify the records from the website, but now validating all fields. What I do is validate some fields when the record is created from the text file, and then validate

Re: [Rails] How can I conditional the validation on a model validation?

2010-03-13 Thread Colin Law
On 13 March 2010 18:20, Jorge alejandro Mendoza torres li...@ruby-forum.com wrote: I'm making an application in Ruby, but I create records from text files, which contain basic information to create a record. Then I modify the records from the website, but now validating all fields. What I do