class GameController < ApplicationController
+
+ # Make sure that the user has logged in before they can take any action
+ before_filter :authorize
+
def index
list
render :action => 'list'
def searchresults
query = params[:q]
- @games = Game.find(:all, :conditions => ["title = ?", query])
+ @games = Game.find(:all, :conditions => ["title like ?", query[0]+"%"])
end
end