[Nitro] Problem with Og post method

arne at arnebrasseur.net arne at arnebrasseur.net
Thu Aug 16 03:48:52 EDT 2007

Hi Matt,

Jonathan or George will probably have to answer this one, but just a guess
: where in the class definition did you make the call to post?

Og does some magic with the class, but only after it found out that the
class has to be managed by Og. Presumably the aspect methods are available
after that.

I can't test this where I'm now, and I'm no Og expert, but I'm thinking that

# this might not work
class Something
   post ....
   attr_accessor :name, String

# this might work
class Something
   attr_accessor :name, String
   post ....


> Hello, I'm struggling a little with using the post method. I have two
> classes,
> Root and Account < Root, and I can't get post to work inside of the Root
> class. However, it does work in the Account class. When I try to utilize
> the
> method in Root, I get:
> `method_missing': undefined method `post' for Root:Class (NoMethodError)
> I'm using post with the following arguments:
> post :to_world, :on => [:og_read], where to_world is a Root method
> The only difference between the two classes, with regards to Og, is that
> Account is Timestamped and requires glue/timestamped (though I got the
> same
> errors in Root when I added the same data). Although post seems to work
> fine
> in Account, I did get the same NoMethodError for Account two or three
> times
> in a row, though I haven't been able to duplicate it. It happened right
> after
> I removed my original post method attempt from Root and returned it to
> Account.
> I'd of course like to figure this issue out, if possible, but the purpose
> is
> trying to test whether or not I can place the post method in Root and have
> Account#og_read call to_world. This is probably easier to answer?
> Thank you for any help,
> Matt
> _______________________________________________
> Nitro-general mailing list
> Nitro-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/nitro-general

More information about the Nitro-general mailing list