Permalink
Browse files

Add a /rails.rb for each framework for consistency

  • Loading branch information...
1 parent 1e41097 commit a23f4b6aeed6b49f90f5c544c818798840f090b7 Carl Lerche committed Dec 31, 2009
@@ -1,3 +1,5 @@
+require "action_controller"
+
module ActionController
class Plugin < Rails::Plugin
plugin_name :action_controller
@@ -0,0 +1 @@
+require "action_view"
@@ -0,0 +1 @@
+require "active_model"
@@ -2,6 +2,7 @@
# rails, so let's make sure that it gets required before
# here. This is needed for correctly setting up the middleware.
# In the future, this might become an optional require.
+require "active_record"
require "action_controller/rails"
module ActiveRecord
@@ -0,0 +1 @@
+require "active_resource"
View
@@ -1,8 +1,14 @@
require "rails/core"
-%w(active_model active_record action_controller action_view action_mailer active_resource).each do |framework|
+%w(
+ active_model
+ active_record
+ action_controller
+ action_view
+ action_mailer
+ active_resource
+).each do |framework|
begin
- require framework
require "#{framework}/rails"
rescue LoadError
end
@@ -14,9 +14,11 @@
end
require 'rails'
-# To skip frameworks you're not going to use, remove require "rails" and
-# list the frameworks that you are going to use.
+# To skip frameworks you're not going to use, change require "rails"
+# to require "rails/core" and list the frameworks that you are going
+# to use.
#
+# require "rails/core"
# require "active_model/rails"
# require "active_record/rails"
# require "action_controller/rails"

0 comments on commit a23f4b6

Please sign in to comment.