Skip to content

Instantly share code, notes, and snippets.

@abrambailey
Created January 19, 2013 21:07
Show Gist options
  • Save abrambailey/4575140 to your computer and use it in GitHub Desktop.
Save abrambailey/4575140 to your computer and use it in GitHub Desktop.
def update
@style = Style.find(params[:id])
if @style.update_attributes(params[:style])
redirect_to add_path
else
respond_to do |format|
format.html { render action: "edit" }
format.json { render json: @style.errors, status: :unprocessable_entity }
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment