Module: Livefyre::Helpers
- Defined in:
- lib/livefyre/helpers.rb
Overview
Public: View helpers for Livefyre
Instance Method Summary collapse
-
#livefyre_comments(id, title, link, tags = nil, options = {}) ⇒ Object
Public: Add a Livefyre comment form to this page.
Instance Method Details
#livefyre_comments(id, title, link, tags = nil, options = {}) ⇒ Object
Public: Add a Livefyre comment form to this page.
id - [String, Integer] identifier to use for this conversation. Likely a post ID. title - [String] Title of this post or conversation link - [String] Link to this post or conversation tags - [Array, String] Optional array or comma-delimited list of tags on this conversation. options - [Hash] Additional options to pass to the created div tag.
Returns [String] div element for insertion into your view
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/livefyre/helpers.rb', line 14 def livefyre_comments(id, title, link, = nil, = {}) = (id, title, link, ) .merge!( :id => "livefyre_comments", :data => { :checksum => [:checksum], :"collection-meta" => [:collectionMeta], :"site-id" => [:siteId], :"article-id" => [:articleId], :network => Livefyre.client.host, :root => Livefyre.config[:domain], :"post-to-buttons" => Livefyre.config[:postToButtons] } ) content_tag(:div, "", ) end |