Skip to content

Instantly share code, notes, and snippets.

@rodreegez
Created March 18, 2009 15:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rodreegez/81170 to your computer and use it in GitHub Desktop.
Save rodreegez/81170 to your computer and use it in GitHub Desktop.
class UploadsController < ApplicationController
def new
@mp3 = Mp3.new
end
def create
@mp3 = Mp3.new(params[:mp3])
if @mp3.save
redirect_to upload_path(@mp3)
else
render :action => 'new'
end
end
def show
@mp3 = Mp3.find(params[:id])
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment