View difference between Paste ID: zQHqV9HY and bT16LhJ4
SHOW: | | - or go back to the newest paste.
1-
def create
1+
def create
2-
  @movie = Movie.find params[:id]
2+
   @movie = Movie.create(params[:movie])
3-
  @movie.update_attributes!(params[:movie])
3+
 # @movie = Movie.find params[:id]
4-
  respond_to do |client_wants|
4+
 # @movie.update_attributes!(params[:movie])
5-
    client_wants.html {  redirect_to movie_path(@movie)  } # as before
5+
  respond_to do |client_wants|
6-
    client_wants.xml  {  render :xml => @movie.to_xml    }
6+
    client_wants.html {  redirect_to movie_path(@movie)  } # as before
7-
  end
7+
    client_wants.xml  {  render :xml => @movie.to_xml    }
8
  end
9
end