3 ms·
Viewer.visible(current_account.posts, to: current_user) That's essentially a function inside a module/namespace. You aren't making a separate class/object for
by joevandyk 14y ago
Viewer.visible(current_account.posts, to: current_user)
That's essentially a function inside a module/namespace. You aren't making a separate class/object for it.
- dhh 14y agoThat's essentially my beef with most query objects. Wrapping a query in an object like that is usually too much ceremony for something that's just a method. It doesn't get any better by having Viewer.new(current_account.posts, current_user).visibles or #execute or whatever else you'd do in a query object.