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 4112122
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T22:09:17+00:00 2026-05-20T22:09:17+00:00

I have recently started building an application in rails (3.0.5). Just to get things

  • 0

I have recently started building an application in rails (3.0.5). Just to get things moving, I scaffolded one of my models (say, User). Now, the model this creates is a completely bare extension of ActiveRecord::Base, however the controller makes use of User.create(params[:user]) etc. implying attr_accessible is being set.

Some time later (now), after some changes, I’m getting warnings about protected fields in mass assignments, and none of these methods are working! Can anyone help me figure out why this is and why rails would scaffold something that shouldn’t work?

  • 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-20T22:09:18+00:00Added an answer on May 20, 2026 at 10:09 pm

    Scaffolding and attr_accessible are two completely different things.

    When you specify an attribute as accessible, you say that when you try to mass assign(like save) your model, ONLY the accessible values will be updated. So, if you have the username field as accessible and you try to change the password field, the latter will not change and you will get a warning.

    Scaffolding on the other hand, is just a quick way to get a RESTful resource up and running fast.

    There is really no connection to the two ideas.

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

Sidebar

Related Questions

I have recently started programming in PHP. I am building a cart in PHP.
I have recently started seeing user agents like Java/1.6.0_14 (and variations) on my site
I have started using django very recently . I am building a service with
I have recently upgraded to Rails 3 and created a new application with Rails
I recently started building a console version of a web application. I copied my
I'm very used to working in WPF, but I have recently started building websites
I have recently started work on an application that is already deployed to production.
I have recently started using VirtualBox to get my Linux environment rather than fully
I have recently started on a project developing a window mobile/ce buisiness application. I
I've recently started creating a WPF application, and am just hoping that someone can

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.