Is it possible to avoid loading action_controller with Rails 3?

Basically I want to download this:

require "active_record/railtie"
require "active_resource/railtie"
require "action_mailer/railtie"


and not download action_controller

because in this particular situation I am not using it.

Looking at the code in the main Rails I see:

# For now, action_controller must always be present with
# rails, so let 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 "action_controller/railtie"


... so I was wondering: is it possible to load Rails with only active_record

, active_resource

and action_mailer

, or do I always have to load action_controller



source to share

1 answer

Rails is the MVC framework for the web, and Resque is a Redis-enabled Ruby library for creating background jobs.

If you need models, use ActiveRecord.

If you need views, Ruby has ERB in its standard library.

If you don't need routes and controllers, then using the web framework doesn't make any sense.



All Articles