http://apidock.com/rails/ActiveRecord/Base/update_attributes

Use 
attr_accessible<http://apidock.com/rails/ActiveRecord/Base/attr_accessible/class>to
prevent mass assignment (by users) of
attributes <http://apidock.com/rails/ActiveRecord/Base/attributes> that
should not be editable by a user.

On Thu, Mar 26, 2009 at 3:39 PM, David C <[email protected]> wrote:

>
> Trying to use inline editing, I ran into a problem with
> do_update_column because it uses update_attributes and the attribute
> being updated is declared attr_protected (or left out of a
> attr_accessible declaration).
>
> Since do_update_column is only modifying a single attribute, and is
> never involved with mass assignment, it seems to me that the code
> could be easily changed to avoid the mass assignment prohibition. Are
> there any side effects that I'm overlooking in suggesting such a
> change, or should I instead be overriding do_update_column in each of
> the relevant controllers?
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"ActiveScaffold : Ruby on Rails plugin" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/activescaffold?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to