Skip to content

Instantly share code, notes, and snippets.

Created December 29, 2012 23:44
Show Gist options
  • Save anonymous/4410050 to your computer and use it in GitHub Desktop.
Save anonymous/4410050 to your computer and use it in GitHub Desktop.
class DisqusablePresenter < Struct.new(:subject)
def disqus_id
dom_id(subject)
end
def to_s
render :partial => 'disqusable/disqus_thread', :locals => {:subject => self}
end
end
// In the view...
<%= raw DisqusablePresenter.new(@post) %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment