Rails activerecord attributes=

Posted by vinhboy on Stack Overflow See other posts from Stack Overflow or by vinhboy
Published on 2010-03-22T07:46:47Z Indexed on 2010/03/22 7:51 UTC
Read the original article Hit count: 335

Filed under:
|
|

Hi,

I am doing this:

@person.attributes = params[:person]

Can anyone give me a clue as to why doing an attributes= would cause a bunch of SQL to show in my logs?

I see a couple of SELECT and even an UPDATE.

I swear I am not doing a "save" -- so I have no idea why setting attributes would trigger queries.

Is there a before_ of after_ filter I am missing?

Thanks.

© Stack Overflow or respective owner

Related posts about ruby

Related posts about ruby-on-rails