ruby on rails - Devise's validateable module doesn't respect custom defined email_required? method -


so far can tell, in order use validateable module, selectively disable email field's validations, must define protected method email_required? on model , have return false.

i've done this, appears email validation still triggered. bug in devise, or missing crucial step?

below relevant parts of user model:

class user < activerecord::base     devise :database_authenticatable, :registerable, :recoverable, :rememberable, :trackable, :validatable      protected       def email_required?         false        end end 

in case still running this, has been added--but believe in 1.2 branch. download , install 1.2rc , can skip email validation done in question.

https://github.com/plataformatec/devise


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

html - Instapaper-like algorithm -

c# - How to execute a particular part of code asynchronously in a class -