Skip to content

Instantly share code, notes, and snippets.

@cored
Created June 21, 2013 13:56
Show Gist options
  • Save cored/5831331 to your computer and use it in GitHub Desktop.
Save cored/5831331 to your computer and use it in GitHub Desktop.
require 'delegate'
class PicturePostExhibit < SimpleDelegator
def initialize(model, context)
@context = context
super(model)
end
def render_body
@context.render(partial: "/posts/picture_body", locals: { post: self })
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment