From 22ee3776a23cce154bda4c6a46a12b3923c1fade Mon Sep 17 00:00:00 2001 From: randuin Date: Sun, 11 Sep 2011 02:37:15 -0700 Subject: [PATCH] issue 35 fix, just a model limiting mass assignment --- app/models/user.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/user.rb b/app/models/user.rb index 37cc2ee6f..5697d2d6f 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -14,7 +14,7 @@ class User < ActiveRecord::Base end attr_accessor :password, :old_password - attr_accessible :password, :old_password, :password_confirmation, :password_hash, :email, :last_logged_in_at, :last_forum_read_at, :has_mail, :receive_email_notifications, :comment_threshold, :always_resize_images, :favorite_tags, :blacklisted_tags, :name, :ip_addr + attr_accessible :password, :old_password, :password_confirmation, :password_hash, :email, :last_logged_in_at, :last_forum_read_at, :has_mail, :receive_email_notifications, :comment_threshold, :always_resize_images, :favorite_tags, :blacklisted_tags, :name, :ip_addr, :time_zone validates_length_of :name, :within => 2..20, :on => :create validates_format_of :name, :with => /\A[^\s:]+\Z/, :on => :create, :message => "cannot have whitespace or colons" validates_uniqueness_of :name, :case_sensitive => false, :on => :create