This project is archived and is in readonly mode.
Rails 3.0.3 Controller inheritance is broken
-
jamesw
Sorry for the unformatted code
This is the code formatted (hopefully easier to read (That'll teach me not to hit the preview button)
@@@ class ApplicationController < ActionController::Base before_filter :authorize, :except => :loginend
class PublicController < ApplicationController
protected
#Protected methods available to all descendant controllers
#This is a public controller so no authorization is necessary def authorize end
#Other methods that need to be made available for public controllers to be added here ... end
class CustonerController < ApplicationController
protected #Protected methods available to all descendant controllers
#This is a customer controller so authorize as a customer #TODO def authorize end
#Other methods that need to be made available for public controllers to be added here #TODO def current_customer end ... end
And again similarly for the admin controller
class AdminController < ApplicationController
protected #Protected methods available to all descendant controllers
#This is a customer controller so authorize as a customer #TODO def authorize end
#Other methods that need to be made available for public controllers to be added here #TODO def current_customer end ... end @@@
And
@@@ class Admin::CustomerController < AdminController #Controller for customer administration
#... end @@@
-
jamesw
Oh well! Formatting still isn't right please feel free to delete the above comment and this one
-
jamesw
Further investigation shows the same issue on Rails 3.0.7 but I'm unable to test on 3.1 beta1 as I am unable to get 3.1 beta1 apps to run (I'm getting an error with bundle and sqlite gem errors)
-
jamesw
Sorry, My mistake.
I had a corrupted routes.rb file.
A totally new project did not have this problem.
Please close this ticket