aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r--actionpack/lib/action_controller/dependencies.rb8
-rw-r--r--actionpack/lib/action_controller/helpers.rb2
2 files changed, 1 insertions, 9 deletions
diff --git a/actionpack/lib/action_controller/dependencies.rb b/actionpack/lib/action_controller/dependencies.rb
index 7fb72417c0..2960330afa 100644
--- a/actionpack/lib/action_controller/dependencies.rb
+++ b/actionpack/lib/action_controller/dependencies.rb
@@ -82,14 +82,6 @@ module ActionController #:nodoc:
def inherited(child)
inherited_without_model(child)
- return if child.controller_name == "application" # otherwise the ApplicationController in Rails will include itself
- model_name = child.controller_name.singularize
- begin
- require_dependency model_name
- child.model model_name
- rescue MissingSourceFile => e
- raise unless e.path == model_name + '.rb'
- end
end
end
end
diff --git a/actionpack/lib/action_controller/helpers.rb b/actionpack/lib/action_controller/helpers.rb
index 1db8a3ceba..ef58d38021 100644
--- a/actionpack/lib/action_controller/helpers.rb
+++ b/actionpack/lib/action_controller/helpers.rb
@@ -93,7 +93,7 @@ module ActionController #:nodoc:
inherited_without_helper(child)
begin child.helper(child.controller_path)
rescue MissingSourceFile => e
- raise unless e.path == "helpers/#{child.controller_path}_helper.rb"
+ raise unless e.is_missing?("helpers/#{child.controller_path}_helper")
end
end
end