Hobo / hobo

The web app builder for Rails (moved from tablatom/hobo)
http://hobocentral.net
103 stars 39 forks source link

auto_actions :except does not work with Admin::AdminSiteController #24

Closed agreif closed 10 years ago

agreif commented 11 years ago

auto_actions :except => :new works fine for Controllers which reside in the controllers/ folder and inherit from ApplicationController, but the :except is ignored if I use the admin subsite and the controllers in the admin/ folder inherit from the Admin::AdminSiteController

I use 2.0.0.pre8 from git

a small update: the behaviour is also correct if the controller inherits Admin::AdminSiteController and it is in the controllers/ folder (and not in admin/)

hbaragar commented 10 years ago

I don't think that this is a bug.

Do you have an "index" method defined in your Admin::AdminSiteController? If so, that method is being inherited by all the rest of the controllers in the subsite.

If you want an index page for the admin subsite, then "hobo g front_controller admin/front" and change the "match 'admin/front'" to "match 'admin/'" in config/routes.rb.

I guess the question/issue is: should hobo generate a front page for subsites?

iox commented 10 years ago

Ok with the explanation from Henry. Let's close this until more news :)