Hobo / hobo

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

admin controllers should inherit from Admin::AdminSiteController #22

Closed agreif closed 10 years ago

agreif commented 11 years ago

when I let hobo generate the admin subsite (model name "Login" instead of default "User"), then the admin/logins_controller.rb extends the normal ApplicationController instead of Admin::AdminSiteController.

generated: class Admin::LoginsController < ApplicationController

should be: class Admin::LoginsController < Admin::AdminSiteController

I use 2.0.0.pre7

bryanlarsen commented 11 years ago

Unable to reproduce. In app/controllers/admin/providers_controller.rb:

class Admin::ProvidersController < Admin::AdminSiteController

  hobo_model_controller
  auto_actions :all, :except => :new

end

the new form did appear as expected.

Did find this bug in the bootstrap theme though: https://github.com/Hobo/hobo_bootstrap/commit/d4de7e24dadfa5f58fdee950b3f46dfe4e6308bb

agreif commented 11 years ago

I could reproduce it with 2.0.0pre8:

create a new project with: hobo new $proj --setup --add-admin-subsite --locales="en de" --default-locale=en --migration-migrate --git-repo --activation-email --test-framework=rspec --update --dryml-only-templates -d postgresql

the file app/controllers/admin/users_controller.rb

class Admin::UsersController < ApplicationController hobo_model_controller auto_actions :all end

should be: class Admin::UsersController < Admin::AdminSiteController

bryanlarsen commented 11 years ago

Yup, haven't fixed it yet.

On Tue, Feb 5, 2013 at 6:56 AM, Alex Greif notifications@github.com wrote:

I could reproduce it with 2.0.0pre8:

create a new project with: hobo new $proj --setup --add-admin-subsite --locales="en de" --default-locale=en --migration-migrate --git-repo --activation-email --test-framework=rspec --update --dryml-only-templates -d postgresql

the file app/controllers/admin/users_controller.rb

class Admin::UsersController < ApplicationController hobo_model_controller auto_actions :all end

should be: class Admin::UsersController < Admin::AdminSiteController

— Reply to this email directly or view it on GitHubhttps://github.com/Hobo/hobo/issues/22#issuecomment-13126037.

hbaragar commented 10 years ago

Pull request #39 fixes this.

iox commented 10 years ago

Merged!