Commit fb72df7a

mo khan <mo@mokhan.ca>
2014-09-07 14:29:08
use update instead of update_attributes.
1 parent 48b69b3
Changed files (1)
app
services
app/services/application/update_cake_command.rb
@@ -9,7 +9,7 @@ class UpdateCakeCommand
     cake = current_user.creations.find(id)
     current_user.tag(cake, with: tags, on: :tags)
 
-    if cake.update_attributes(creation_params.reject { |key, value| key == "tags" })
+    if cake.update(creation_params.reject { |key, value| key == "tags" })
       @context.update_cake_succeeded(cake)
     else
       @context.update_cake_failed(cake)