Hi,

I am updating a record using activeresource object. I get an error "cant
mass assign protected attributes id, created_at , updated_at". This is
because i read a record, modify some values and then update the entry
using object.save( which also updates id, created_at etc). To remove
this error i can include the id, created_at fields in the model file.
But is there a better way to get out of this prob?

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en-US.

Search Discussions

  • Dennis B. at Nov 27, 2012 at 11:55 am
    Got the same problem here. Did you solve this issue?

    Thanks in advance.

    --
    Posted via http://www.ruby-forum.com/.

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedJun 29, '12 at 10:52p
activeNov 27, '12 at 11:55a
posts2
users1
websiterubyonrails.org
irc#RubyOnRails

1 user in discussion

Dennis B.: 2 posts

People

Translate

site design / logo © 2021 Grokbase