Sha256: 19acf18af04406d243d4257f527d5163c0d32b4ab4b26d2ec6e2fb76b20cb571

Contents?: true

Size: 542 Bytes

Versions: 8

Compression:

Stored size: 542 Bytes

Contents

module PostsHelper

  # The ShareThis widget defines a bunch of attributes you can customize.
  # Facebook seems to ignore them (it uses title and description meta tags
  # instead).  MySpace, however, only works if you set these attributes.
  def sharethis_options(post)
    content_tag :script, :type=>"text/javascript" do   
      <<-eos
	SHARETHIS.addEntry({
		title:'#{escape_javascript(post.title)}',
                content:'#{escape_javascript(truncate_words(post.post, 75, '...' ))}'
	}, {button:true});
      eos
    end
  end

end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
community_engine-2.3.2 app/helpers/posts_helper.rb
community_engine-2.3.1 app/helpers/posts_helper.rb
community_engine-2.3.0 app/helpers/posts_helper.rb
community_engine-2.1.0 app/helpers/posts_helper.rb
community_engine-2.0.0 app/helpers/posts_helper.rb
community_engine-2.0.0.beta3 app/helpers/posts_helper.rb
community_engine-2.0.0.beta2 app/helpers/posts_helper.rb
community_engine-2.0.0.beta1 app/helpers/posts_helper.rb