Validation in different actions

hi2all.

for example, I have 2 resembling actions(not same!), and in one of them
I want to some validation work, in other- no.

data in them is very resembling to, and I can’t do this:

validate :v_method, :if => “some.data_differences.exists?”

Which the best way you recommend?

Cheers, Michael

On 3 December 2011 15:36, Misha O. [email protected] wrote:

hi2all.

for example, I have 2 resembling actions(not same!), and in one of them
I want to some validation work, in other- no.

data in them is very resembling to, and I can’t do this:

validate :v_method, :if => “some.data_differences.exists?”

Have a look at the Rails Guide on validations. There are several ways
to do conditional validation, if necessary you can write a custom
validation.

Colin

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs