Skip to content

Instantly share code, notes, and snippets.

@opheliasdaisies
Created January 9, 2014 14:27
Show Gist options
  • Select an option

  • Save opheliasdaisies/8334907 to your computer and use it in GitHub Desktop.

Select an option

Save opheliasdaisies/8334907 to your computer and use it in GitHub Desktop.
class GamesController < ApplicationController
def index
@games = Game.all
end
def new
@game = Game.new
end
def show
@game = Game.find(params[:id])
end
# POST /games
# POST /games.json
def create
@game = Game.new(params[:games])
if @game.save
redirect_to @game
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment