I found Tom Locke's old post which I think will help me. [Hobo Users] Re: auto_actions_for causes NoMethodError nil.macro
Tom Locke Wed, 12 Nov 2008 07:23:26 -0800 When you do > auto_actions_for :log, :create 'log' has to be the name of a belongs_to, and the class it references must have a corresponding has_many that associates back to this class On Feb 16, 10:35 am, Brian Corbin <[email protected]> wrote: > I am trying to follow along with the Ajax paperclip recipe and am > getting this error: > > undefined method `macro' for nil:NilClass > C:/Ruby187/lib/ruby/gems/1.8/gems/activesupport-3.0.3/lib/ > active_support/whiny_nil.rb:48:in `method_missing': undefined method > `macro' for nil:NilClass (NoMethodError) > from C:/Ruby187/lib/ruby/gems/1.8/gems/hobo-1.3.0.pre26/lib/ > hobo/controller/model.rb:261:in `auto_actions_for' > from C:/wamp/www/hawkeye3/app/controllers/ > uploads_controller.rb:5 > > Lines 5 and 6 of my uploads_controller.rb are just like the recipe: > auto_actions_for :event, [:create, :new] > belongs_to :owner, :class_name => "Event", :creator => true # > Shouldn't :class_name => "Package" in the recipe? > > My Event model has > has_many :uploads, :dependent => :destroy, :class_name => "Upload" > > The only difference between my setup and the recipe is that I'm > attaching to Events, and the recipe is attaching to Pacakges, and I'm > on Hobo 1.3. > > Any hints would be very much appreciated! -- You received this message because you are subscribed to the Google Groups "Hobo Users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/hobousers?hl=en.
