Skip to content

Commit

Permalink
intemediate state of files for screencasts in ruby-intro chapter
Browse files Browse the repository at this point in the history
  • Loading branch information
armandofox committed Jan 14, 2012
1 parent 023e93f commit a31420f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions app/controllers/movies_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,27 +15,9 @@ def new
end

def create
debugger
@movie = Movie.create!(params[:movie])
flash[:notice] = "#{@movie.title} was successfully created."
redirect_to movies_path
end

def edit
@movie = Movie.find params[:id]
end

def update
@movie = Movie.find params[:id]
@movie.update_attributes!(params[:movie])
flash[:notice] = "#{@movie.title} was successfully updated."
redirect_to movie_path(@movie)
end

def destroy
@movie = Movie.find(params[:id])
@movie.destroy
flash[:notice] = "Movie '#{@movie.title}' deleted."
redirect_to movies_path
end

end
Binary file modified db/development.sqlite3
Binary file not shown.

0 comments on commit a31420f

Please sign in to comment.