Skip to content

Instantly share code, notes, and snippets.

@richmolj
Created June 24, 2013 14:08
Show Gist options
  • Save richmolj/5850306 to your computer and use it in GitHub Desktop.
Save richmolj/5850306 to your computer and use it in GitHub Desktop.
# BgovService is just a placeholder here, to illustrate this is a service-backed
# class, not ActiveRecord
class Comment < BgovService
end
class Photo < BgovService
end
class Article
attr_accessor :name
def assemble
{
:name => @name,
:comments => Comment.all,
:photo => Photo.all
}
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment