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.
Setting attributes on a standard model does not cause any
SELECTorUPDATEcalls as far as I am aware. This is further seen to be true when I run log concurrently with a script/console session:You can see here that there is only two SQL queries that get executed, one to fetch the
Forumrecord and the other to find out what columns are on theforumstable.It is not until I save it that it does some queries: