Hello, is it because of :on => :create? maybe you could change it to
default
On Feb 10, 1:46 pm, Dharmdip Rathod
<rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>
wrote:> Hello ,
>
> I am facing strange problem here. I have model customer.rb , i am
> validating following fields
>
> validates_presence_of :email
> validates_format_of :email, :with =>
> /(^([^@\s]+)@((?:[-_a-z0-9]+\.)+[a-z]{2,})$)|(^$)/i
> validates_uniqueness_of :email
> validates_presence_of :password, :on => :create
> validates_length_of :password, :in => 4..20, :allow_nil =>
false,:on
> => :create
> validates_presence_of:password_confirmation, :if =>
> :password_required?
> validates_confirmation_of :password, :if => :password_required?
> validates_presence_of :first_name
> validates_presence_of :last_name
> validates_presence_of :address
> validates_presence_of :country_id
> validates_presence_of :state_id
> validates_presence_of :city
> validates_numericality_of :zip
> validates_presence_of :phone
> validates_presence_of :securityque_id
> validates_presence_of :answer
> validates_acceptance_of :policy
>
> after submitting form successfully , i am giving update facility for
> updatepassword, and edit profile when i am updating profile it ask for
> password field and when i am updating password it ask for nothing .
> is there any way ????
> thank in advance.
> --
> Posted viahttp://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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---