Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


RailsGuides: GettingStarted: ActiveModel description needs work #2242

jasonnoble opened this Issue · 3 comments

4 participants


Current Description:

Active Model provides a defined interface between the Action Pack gem services and Object Relationship Mapping gems such as Active Record. Active Model allows Rails to utilize other ORM frameworks in place of Active Record if your application needs this.

If I look at this from a beginner's viewpoint, there are lots of "scary" words here. Can we come up with a good, basic overview of what Active Model does?

First stab:

Active Model provides a common interface to all the database back ends that Rails can talk to. For example, Active Model allows you to pull data from the database and work with that data. Because Rails uses Active Model, you don't need to know how to ask for MySQL data vs. Sqlite3 data, etc.

Comments? Suggestions?

How does Active Model differ from Active Record?
Why would I use one over the other?

@fxn fxn was assigned

Well ActiveModel actually does not allow you to pull data from the database. It mostly just offers a common API for all the ORMs (like ActiveRecord) to use, guaranteeing that writing code against ActiveModel will allow to switch the actual ORM implementations. This is pretty much what the original description explains imho. And I don't personally see how "utilize", "interfacing" etc are scary words :P


Closing this. Positive changes are welcome in docrails.

@vijaydev vijaydev closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.