Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'attr_accessible'
  • Loading branch information
Dan Croak committed Jan 19, 2010
2 parents 408277c + 61cb8e5 commit 712a218
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 21 deletions.
18 changes: 0 additions & 18 deletions lib/clearance/user.rb
Expand Up @@ -24,29 +24,11 @@ def self.included(model)
model.extend(ClassMethods)

model.send(:include, InstanceMethods)
model.send(:include, AttrAccessible)
model.send(:include, AttrAccessor)
model.send(:include, Validations)
model.send(:include, Callbacks)
end

module AttrAccessible
# Hook for attr_accessible white list.
#
# :email, :password, :password_confirmation
#
# Append other attributes that must be mass-assigned in your model.
#
# @example
# include Clearance::User
# attr_accessible :location, :gender
def self.included(model)
model.class_eval do
attr_accessible :email, :password, :password_confirmation
end
end
end

module AttrAccessor
# Hook for attr_accessor virtual attributes.
#
Expand Down
3 changes: 0 additions & 3 deletions test/models/user_test.rb
Expand Up @@ -2,9 +2,6 @@

class UserTest < ActiveSupport::TestCase

should_not_allow_mass_assignment_of :email_confirmed,
:salt, :encrypted_password, :remember_token

# signing up

context "When signing up" do
Expand Down

0 comments on commit 712a218

Please sign in to comment.