0

What is the main role of the followings on a high level note

  1. ActionController
  2. ActiveSupport
  3. ActiveRecord
  4. ActiveResource

I want to know in which context they are used.

As of now, I know that ActionController is used for inheriting controllers and ActiveRecord for inheriting models in a rails application. Where in rails app, the other two deployed?

pranav prashant
  • 307
  • 1
  • 3
  • 13

1 Answers1

0

Have a look at the rails repository.

  • ActiveRecord is the database ORM, the model component in the MVC Rails stack
  • ActiveController, part of ActionPack, is the controller component of the MVC Rails stack
  • ActiveResource is an HTTP Rest client that provides ActiveRecord-like capabilities to interact with resources via an HTTP interface. It's not used by default, and it's no longer part of the default list of gems in new Rails projects from Rails 4.2.
  • ActiveSupport can be considered the Rails toolkit. It contains several libraries and Ruby core extensions that are used by the other Rails components. For instance, date manipulation such as 10.days.ago is provided by the ActiveSupport::Duration class.
Simone Carletti
  • 173,507
  • 49
  • 363
  • 364