Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails active vs action (Railties naming) [duplicate]

Railties in Rails are named starting either with active or action:

  • action mailer
  • action pack
  • action view
  • active job
  • active model
  • active record
  • active support

What's the difference between active and action, and what do these words have to do with component's contents or functionality?

like image 346
lakesare Avatar asked Aug 18 '15 09:08

lakesare


1 Answers

Action names represents the controller layer (and the view layer), responsible for handling incoming HTTP requests and providing a suitable response.

Active names represents the model layer. Represents your domain model and encapsulates the business logic that is specific to your application.

This text is from the README.md file in the Rails repository: https://github.com/rails/rails/blob/master/README.md

like image 120
Fran Martinez Avatar answered Nov 19 '22 09:11

Fran Martinez