> > Well, two minor things I could ask about: first, do I really have to > > keep declaring the same 4 permission methods (in my case, because I'm > > using an admin subsite, they all return true, all the time) in the > > model; can the model classes be subclasses of an abstract domain model > > class that has the permissions, or can you think of a different/better > > way to accomplish the same thing? > > I can't think of a better way off the top of my head - note that in > the standard use case, the models are generated with the hobo_model > generator that automatically builds that skeleton. > > In your case, copy+paste FTW. :) > > --Matt Jones
There's actually a better way and it's demoed in the cookbook. http://github.com/tablatom/hobocookbook/tree/master/app/models/ check out say recipe.rb (there are others) and owned_model.rb. It's a really nice way to abstract out common components. I use something like owned_model in most of my apps. -- 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.
