ActiveRecord update
Realise for some data modification on the database a simple sql session is still necessary, despite the availability of the Rails console. Learnt it the hard way today, when I tried to modify some production data and I couldn't. I couldn't because of some rules built into the update methods of the ActiveRecord model. In the end, I had to do it by firing up an sql session (eg. SQLPlus).
On hindsight, I could still get around the rules by calling the method, update_by_sql. Oh well, am still on the learning path on RubyOnRails and Ruby.
On hindsight, I could still get around the rules by calling the method, update_by_sql. Oh well, am still on the learning path on RubyOnRails and Ruby.
0 Comments:
Post a Comment
<< Home