I would like to validate the presence of a file with paperclip. When I attempt to submit the form it rolls back, but for some reason it goes looking for a create.erb template which does not exist. I don't get any sort of error message either
class Image < ActiveRecord::Base
has_attached_file :photo,
:styles => {
:thumb => "100x100#",
:small => "750x750>" }
validates_attachment_presence :photo
class ImagesController < ApplicationController
before_filter :require_user, :only => [:new, :create]
def new
@image = Image.new
end
def create
@image = Image.new(params[:image])
@image.user = current_user
if @image.save
flash[:notice] = 'image uploaded'
redirect_to :controller => "images", :action => "index"
end
end
def show
@image = Image.find(params[:id])
end
using the gem, version 2.3.3