Created
July 16, 2010 05:04
-
-
Save runlevel5/477951 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class User < ActiveRecord::Base | |
acts_as_authentic do |c| | |
c.transition_from_restful_authentication = true | |
#AuthLogic defaults | |
#c.validate_email_field = true | |
#c.validates_length_of_email_field_options = {:within => 6..100} | |
#c.validates_format_of_email_field_options = {:with => email_regex, :message => I18n.t(‘error_messages.email_invalid’, :default => “should look like an email address.”)} | |
#c.validate_password_field = true | |
#c.validates_length_of_password_field_options = {:minimum => 4, :if => :require_password?} | |
#for more defaults check the AuthLogic documentation | |
end | |
end | |
#---------------------------------------------------------- | |
module Spree::Models::User | |
def self.included(target) | |
target.class_eval do | |
acts_as_authentic do |c| | |
c.transition_from_restful_authentication = true | |
c.validate_email_field = false | |
end | |
end | |
end | |
end | |
#------------------------------------------------- | |
User.send :include, Spree::Models::User | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment