Remove explicit require_dependency of Principal

This should no longer be necessary (thanks also to 8edff983).

This effectively reverts 423152fa06

Signed-off-by: Alex Coles <alex@alexbcoles.com>
pull/2404/merge
Alex Coles 10 years ago
parent 8edff9831c
commit bc5abb34ab
  1. 13
      app/controllers/application_controller.rb

@ -30,19 +30,6 @@
require 'uri'
require 'cgi'
# There is a circular dependency chain between User, Principal, and Project
# If anybody triggers the loading of User first, Rails fails to autoload
# the three. Defining class User depends on the resolution of the Principal constant.
# Triggering autoload of the User class does not immediately define the User constant
# while Principal and Project dont inherit from something undefined.
# This means they will be defined as constants right after their autoloading
# was triggered. When Rails discovers it has to load the undefined class User
# during the load circle while noticing it has already tried to load it (the
# first load of user), it will complain about user being an undefined constant.
# Requiring this dependency here ensures Principal is loaded first in development
# on each request.
require_dependency 'principal'
class ApplicationController < ActionController::Base
class_attribute :_model_object
class_attribute :_model_scope

Loading…
Cancel
Save