3 ms·
Rails MVC blurs the distinction between a "pure" business tier and a db access layer. The intention behind the design of ActiveRecord is that the db access log
by grandalf 16y ago
Rails MVC blurs the distinction between a "pure" business tier and a db access layer.
The intention behind the design of ActiveRecord is that the db access logic is done automagically and you can make AR models your domain model.
The recent trend of adding various finders, etc. to AR models blurs the conceptual clarity a bit. Some plugins also blur this clarity.
Generally you should be able to use AR models as business objects, just be aware that there might be a few other behaviors added on that aren't strictly part of the business rules. This might irritate some people.
You are certainly free to write your business logic as separate classes as you see fit. Rails doesn't tell you not to. It just offers a convention that is often very reasonable for most peoples' needs.