refactor how artist notes are updated

This commit is contained in:
r888888888
2017-04-18 15:57:20 -07:00
parent e639be60e5
commit 68f057e7ba
4 changed files with 104 additions and 82 deletions

View File

@@ -71,12 +71,7 @@ class ArtistsController < ApplicationController
end
def update
body = params[:artist].delete("notes")
@artist.assign_attributes(params[:artist], :as => CurrentUser.role)
if body
@artist.notes = body
end
@artist.save
@artist.update(params[:artist], :as => CurrentUser.role)
respond_with(@artist)
end