Class: Shareable::Helpers::Facebook

Inherits:
Socialize show all
Defined in:
lib/shareable/helpers/tags.rb

Instance Method Summary collapse

Methods inherited from Tag

#initialize

Constructor Details

This class inherits a constructor from Shareable::Helpers::Tag

Instance Method Details

#to_s(locals = {}) ⇒ Object

:nodoc:


31
32
33
34
35
36
37
38
39
40
41
# File 'lib/shareable/helpers/tags.rb', line 31

def to_s(locals={}) #:nodoc:
  if (@options[:options][:static_link] && !(@options[:facebook] && @options[:facebook][:static_link]==false)) || (@options[:facebook] && @options[:facebook][:static_link])
    locals[:options] ||= {}
    p_opts = {:url => CGI::escape(@options[:options][:url])}
    locals[:options].merge!(@options[:options].merge(p_opts))
    if @options[:facebook]
      @options[:facebook][:url] = CGI::escape(@options[:facebook][:url]) if @options[:facebook][:url]
    end
  end
  super locals, "Facebook"
end