Oh now I see - I had just parked code into the module - not within a
method. Dho!

With Fred's pointer and some experimentation, I now have files
uploading from my plugin code. The has_attachment code actually needed
to go into ClassMethods, like so:

    module ClassMethods
      def self.included(model)
        model.class_eval do
          has_attachment :storage => :file_system, :path_prefix =>
'public/photos',
                         :content_type => :image,
                         :min_size => 1.kilobyte, :max_size =>
3.megabyte,
                         :thumbnails => {:thumbnail => 'x100>'}
        end
      end
    end

Have a couple more things to play with - and then I need to see if I
can use has_many_polymorphs within my included modules.

Thanks Fred!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to