On Apr 14, 4:47 pm, Tony Tony <li...@ruby-forum.com> wrote:
> [code] > validates_presence_of :customer_order_number, :on => :update > [/code] > > Because it generates a validation error on my '/cart' page which is > where I can go and edit the product quantities for the client order. > > **I'm sure the solution lies in validates_presence_of with the :if > condition, but I just can't figure out how to make it work.** > The :if option is just the name of an instance method that returns whether the validation should run (eg if the status has some value or something like that) Fred -- 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 rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.