Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Can't mass-assign these protected attributes?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  6 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
KathysKode@gmail.com  
View profile  
 More options May 30 2008, 5:06 pm
From: "KathysK...@gmail.com" <KathysK...@gmail.com>
Date: Fri, 30 May 2008 14:06:46 -0700 (PDT)
Local: Fri, May 30 2008 5:06 pm
Subject: Can't mass-assign these protected attributes?
I've run hundreds of migrations in my happy days with Rails but find
an incredible anomoly here that I can't build a simple record in
migrations. I'm getting the error:
Can't mass-assign these protected attributes: field1, field2, etc.
I found a few Googles about people recently having this problem
running a FasterCSV import, but that's it.
Any ideas are greatly appreciated.
Kathleen

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Frederick Cheung  
View profile  
 More options May 30 2008, 6:09 pm
From: Frederick Cheung <frederick.che...@gmail.com>
Date: Fri, 30 May 2008 15:09:50 -0700 (PDT)
Local: Fri, May 30 2008 6:09 pm
Subject: Re: Can't mass-assign these protected attributes?

On May 30, 10:06 pm, "KathysK...@gmail.com" <KathysK...@gmail.com>
wrote:

> I've run hundreds of migrations in my happy days with Rails but find
> an incredible anomoly here that I can't build a simple record in
> migrations. I'm getting the error:

Have you been using attr_protected or attr_accessible in your models?
They prevent update_attributes, new, create etc... from assigning to
the relevant fields.

Fred


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
KathysKode@gmail.com  
View profile  
 More options May 31 2008, 8:56 am
From: "KathysK...@gmail.com" <KathysK...@gmail.com>
Date: Sat, 31 May 2008 05:56:38 -0700 (PDT)
Local: Sat, May 31 2008 8:56 am
Subject: Re: Can't mass-assign these protected attributes?
Mr. Cheung,
Thank you so much for your reply and hopefully this will help others
using 'restful_authentication'. This line is automatically inserted
into the USER model;

attr_accessible :login, :email, :password, :password_confirmation

If anyone is trying to embellish their user model with the ability for
the user to EDIT or run a migration to load records, they will receive
this message.

Can't mass-assign these protected attributes: field1, field2, etc

Would you just remove this line altogether?
Thank you,
Kathleen

On May 30, 4:09 pm, Frederick Cheung <frederick.che...@gmail.com>
wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jonathan Stott  
View profile  
 More options May 31 2008, 9:26 am
From: Jonathan Stott <jonathan.st...@gmail.com>
Date: Sat, 31 May 2008 14:26:44 +0100
Local: Sat, May 31 2008 9:26 am
Subject: Re: [Rails] Re: Can't mass-assign these protected attributes?
On Sat, 31 May 2008 05:56:38 -0700 (PDT)

The attr_accessible is there for a reason, to protect the application from malicious inputs.

You might want to watch:
http://railscasts.com/episodes/26

Before you remove it all together.  To summarize: Without attr_accessible there, a knowledgeable user can give themselves ownership of user resources or admin privileges.

You might want to instead add the appropriate properties to the attr_accessible.

Regards,
Jon  


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Pratik Khadloya  
View profile  
 More options Aug 18, 8:53 am
From: Pratik Khadloya <rails-mailing-l...@andreas-s.net>
Date: Tue, 18 Aug 2009 14:53:03 +0200
Local: Tues, Aug 18 2009 8:53 am
Subject: Re: Can't mass-assign these protected attributes?
Am also getting the same error. The application was working fine till
yesterday night! All the models have become protected. I have been using
authlogic for a long time now. It never caused me a problem. Can
paperclip / oauth cause it?
--
Posted via http://www.ruby-forum.com/.

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Marnen Laibow-Koser  
View profile  
 More options Aug 18, 10:45 am
From: Marnen Laibow-Koser <rails-mailing-l...@andreas-s.net>
Date: Tue, 18 Aug 2009 16:45:01 +0200
Local: Tues, Aug 18 2009 10:45 am
Subject: Re: Can't mass-assign these protected attributes?
KathysK...@gmail.com wrote:
> I've run hundreds of migrations in my happy days with Rails but find
> an incredible anomoly here that I can't build a simple record in
> migrations.

[...]

Generally, you should not be building records in your migrations.  What
are you trying to do here?

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
mar...@marnen.org
--
Posted via http://www.ruby-forum.com/.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google