Open hbaragar opened 10 years ago
An ugly solution ...
In hobo-2.1.0/lib/generators/hobo/front_controller/templates/controller.rb.erb
change the first line from:
class <%= class_name %>Controller < ApplicationController
to:
class <%= class_name %>Controller < <%= ( subsite = class_name.match(/(.*)::/)) ? "#{subsite[1]}::#{subsite[1]}Site" : "Application" %>Controller
Hopefully somebody can find/create a method that does the subsite
.
Thanks for the code, that makes it much easier!
When the following command is run:
The new
app/controllers/admin/front_controller.rb
starts with the following line:when it should start with: