Topic: acts_as_attachment throwing a NoMethodError

This was just a test to figure out how to upload file so I have a task model that has_many photos.  I created the photo file using the create table migration script on http://weblog.techno-weenie.net/article … attachment

Everything setup nicely and all unit tests passed.  When I create a form and try to upload a file I get the following message

undefined method `acts_as_attachment' for Photo:Class


/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1235:in `method_missing'
app/models/photo.rb:3


Here is the photo model
class Photo < ActiveRecord::Base
  belongs_to :task
  acts_as_attachment :storage => :file_system, :max_size => 300.kilobytes, :content_type => :image
  validates_as_attachment
end

Thanks for the help

Re: acts_as_attachment throwing a NoMethodError

Just checking, did you restart your server after installing the plugin?

Zubin

Re: acts_as_attachment throwing a NoMethodError

That was the problem.  Thanks for the help