2 ms·
As an FYI to your last point - in Rails master (which will be Rails 4), you can active-record-ify a class by including ActiveRecord::Model, rather than inheriti
by sanderjd 14y ago
As an FYI to your last point - in Rails master (which will be Rails 4), you can active-record-ify a class by including ActiveRecord::Model, rather than inheriting from ActiveRecord::Base. In fact, that is all ActiveRecord::Base does itself - https://github.com/rails/rails/blob/master/activerecord/lib/active_record/base.rb#L324 https://github.com/rails/rails/blob/master/activerecord/lib/....
- mattgreenrocks 14y agoBut your core domain classes are still coupled to their persistence mechanism in the name of 'pragmatism.'
- sanderjd 14y agoWho says they have to be? That's a design decision. There is literally nothing (besides maybe inertia?) that enforces that "rule".