Module: Polemic::ViewMethods

Defined in:
lib/polemic/rails/action_view_extension.rb

Instance Method Summary collapse

Instance Method Details

#polemic_for(*options) ⇒ Object



3
4
5
6
7
8
# File 'lib/polemic/rails/action_view_extension.rb', line 3

def polemic_for(*options)
  commentable_object = options[0]
  raise "You should pass object, for which you want to show comments." unless commentable_object
  @_renderer ||= Polemic::StandardRenderer.new(self)
  @_renderer.render_comments(commentable_object, options[1] || {})
end