In my user
model i have validation of password
and an instance method
like this:
class User < ActiveRecord::Base
validate :email ......
validates :password, length: { minimum: 6 }
def my_method
# .....
# save!
end
end
As you can see inside this method i have a call to the save!
method which save the user after altering some fields, so i want to skip the validation of password but not other validations only when i call my_method
on a user instance , how i can do this please ? thank you