RS IZ the photo controller now uses instantiate

This commit is contained in:
ilya 2010-07-22 11:41:00 -07:00
parent 24f8b33f2f
commit b90cb95c64

View file

@ -2,12 +2,10 @@ class PhotosController < ApplicationController
before_filter :authenticate_user!
def create
@photo = Photo.new(params[:photo])
@photo = Photo.instantiate(params[:photo])
@photo.person = current_user
#@photo.album = Album.first(:id => params[:photo][:album_id])
if @photo.save
#@photo.album.save
flash[:notice] = "Successfully uploaded photo."
redirect_to @photo.album
else