Skip to content

Instantly share code, notes, and snippets.

@doug7410
Created July 28, 2014 20:37
Show Gist options
  • Save doug7410/a02de82a49bf42469311 to your computer and use it in GitHub Desktop.
Save doug7410/a02de82a49bf42469311 to your computer and use it in GitHub Desktop.
videos controller
class VideosController < ApplicationController
before_action :require_user
def show
@video = Video.find(params[:id])
end
def search
@search_phrase = params[:search_term]
@search_result = Video.search_by_title(@search_phrase)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment