Habanazo

Create corrected

Feb 25th, 2012
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def create
  2.    @movie = Movie.create(params[:movie])
  3.  # @movie = Movie.find params[:id]
  4.  # @movie.update_attributes!(params[:movie])
  5.   respond_to do |client_wants|
  6.     client_wants.html {  redirect_to movie_path(@movie)  } # as before
  7.     client_wants.xml  {  render :xml => @movie.to_xml    }
  8.   end
  9. end
Advertisement
Add Comment
Please, Sign In to add comment