diff --git a/app/models/user.rb b/app/models/user.rb index 26e0aff0..7615ffab 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -26,7 +26,7 @@ class User < ActiveRecord::Base after_create :set_calendar # prevents a user from submitting a crafted form that bypasses activation # anything else you want your user to change should be added here. - attr_accessible :email, :password, :password_confirmation, :firstname, :lastname, :street, :street2, :city, :state_id, :zip, :show_contact + attr_accessible :email, :password, :password_confirmation, :firstname, :lastname, :street, :street2, :city, :state, :state_id, :zip, :show_contact # Sets the User's active status to true. # TODO: Rename to activate! , since it's destructive. diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index cf9383bb..79b30632 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -36,7 +36,7 @@ aggr.options[:mapping].should == [%w(street street), %w(street2 street2), %w(city city), %w(state_id state), %w(zip zip), %w(coords coords)] state = State.make(:code => 'NY', :country => Country.make(:code => 'US')) opts = {:street => '123 Main Street', :street2 => '1st floor', :city => 'Anytown', :zip => 12345, :state => state} - u = User.make(opts) + u = User.new(opts) u.address.should == Address.new(opts) end