public
Created

DDD Example 4

  • Download Gist
ddd_example4_21.rb
Ruby
1 2 3 4 5 6 7 8 9 10 11
module PostsRepository
def new_posts_of_author author
...
end
end
 
class Post < ActiveRecord::Base
extend PostsRepository
end
 
Post.new_posts_of_author "Jim"

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.