Guest User

Untitled

a guest
Apr 22nd, 2018
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. def update
  2. @channel = Channel.find(params[:id])
  3.  
  4. respond_to do |format|
  5. if @channel.update_attributes(params[:channel])
  6. flash[:notice] = 'Channel was successfully updated.'
  7. format.html { redirect_to(@channel) }
  8. format.xml { head :ok }
  9. else
  10. format.html { render :action => "edit" }
  11. format.xml { render :xml => @channel.errors, :status => :unprocessable_entity }
  12. end
  13. end
  14. end
Add Comment
Please, Sign In to add comment