Skip to content

Instantly share code, notes, and snippets.

@vsavkin
Created March 9, 2012 22:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vsavkin/2009155 to your computer and use it in GitHub Desktop.
Save vsavkin/2009155 to your computer and use it in GitHub Desktop.
DDD Example 4
module PostsRepository
def new_posts_of_author author
...
end
end
class Post < ActiveRecord::Base
extend PostsRepository
end
Post.new_posts_of_author "Jim"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment