RailsGuides: GettingStarted: ActiveModel description needs work #2242

jasonnoble opened this Issue Jul 24, 2011 · 3 comments


None yet
4 participants

jasonnoble commented Jul 24, 2011

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?

@ghost ghost assigned fxn Jul 24, 2011

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


vijaydev commented Oct 7, 2011

Closing this. Positive changes are welcome in docrails.

@vijaydev vijaydev closed this Oct 7, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment