Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7656409
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T12:45:22+00:00 2026-05-31T12:45:22+00:00

In rails 3.2.1, I have a model: class Player < ActiveRecord::Base attr_accessor :password attr_accessible

  • 0

In rails 3.2.1, I have a model:

class Player < ActiveRecord::Base
  attr_accessor :password
  attr_accessible :email, :password
  attr_accessible :email, :password, :confirmed, :as => :admin
end

I keep getting a ActiveModel::MassAssignmentSecurity::Error for the following:

params[:player]
#=> {:email => "some@email.com", :password => "12345", :confirmed => true)
player = Player.new(params[:player])

Why is this happening when all I want it to do is ignore the :confirmed attribute and move on with it’s business. The documentation makes it seem like I should be able to do that, but I keep getting this exception and it’s really getting to me because either I am doing it wrong or the docs are wrong.

I’d love any help with this.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T12:45:23+00:00Added an answer on May 31, 2026 at 12:45 pm

    Comment out this line in development.rb:

    config.active_record.mass_assignment_sanitizer = :strict

    The strict setting will raise an error and the default setting will just log a warning.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following rails model: class Customer < ActiveRecord::Base attr_accessible :firstname, :lastname, :email,
I have a model: class EvidenceType < ActiveRecord::Base has_many :evidences attr_accessible :name end A
I have a rails model that looks something like this: class Recipe < ActiveRecord::Base
I have a rails model class class Model < ActiveRecord::Base has_many :object_collection def add_object(object)
I have a Customers model: class Customer < ActiveRecord::Base has_many :phone_numbers end and a
I have an Item model class Item < ActiveRecord:Base has_and_belongs_to_many :orders end And an
in Rails 2.3.6 I have a User model: class User < ActiveRecord::Base has_attached_file :avatar,
I have the following model, Purchase, on my Rails app: class Purchase < ActiveRecord::Base
I have the following model: class Advisor < ActiveRecord::Base belongs_to :course end class Course
I have a the following rails models: class Release < ActiveRecord::Base has_many :release_questionnaires, :dependent

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.