A simple and readable alternative to update_all({:x=>y}, :id=>id)
Usage
User.update_one(id, :name=>'Pete')
Code
clas ActiveRecord::Base def self.update_one(id, attributes) update_all(attributes, :id => id) end end
A simple and readable alternative to update_all({:x=>y}, :id=>id)
Usage
User.update_one(id, :name=>'Pete')
Code
clas ActiveRecord::Base def self.update_one(id, attributes) update_all(attributes, :id => id) end end