3 ms·
Interactors, domain objects, service objects, etc. are still models; people just don't generally believe that their models are allowed to inherit from things ot
by philwelch 13y ago
Interactors, domain objects, service objects, etc. are still models; people just don't generally believe that their models are allowed to inherit from things other than ActiveRecord::Base.
- mst 13y agoI keep looking at interactors and thinking "I'd make this a command object and then hide it in the model" - so I'd be doing something like (inside the 'member' class) method confirm_grouper () { MyApp::Action::ConfirmGrouper->new(leader => $self) ->run } and then the controller would simply do - my $result = $member->confirm_grouper;
- ulisesrmzroche 13y agoThey're not models, they're Objects. A model is an object but all objects are not models. The difference is what sort of role they play in your app. A Service Object work, could just echo hello world every 15 seconds and still be called a Service Object, while a model in your application doing the same thing can no longer be called a Model.