saasbook

controller_method.rb

Mar 13th, 2014
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.25 KB | None | 0 0
  1. # add to movies_controller.rb, anywhere inside
  2. #  'class MoviesController < ApplicationController':
  3.  
  4. def search_tmdb
  5.   # hardwire to simulate failure
  6.   flash[:warning] = "'#{params[:search_terms]}' was not found in TMDb."
  7.   redirect_to movies_path
  8. end
Add Comment
Please, Sign In to add comment