Module: SocialButtons::Like
- Includes:
- Assistant
- Defined in:
- lib/social_buttons/view_helpers/like.rb
Defined Under Namespace
Classes: Scripter
Constant Summary collapse
- CLASS =
"fb-like"
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.default_options ⇒ Object
21 22 23 24 25 26 27 28 29 30 |
# File 'lib/social_buttons/view_helpers/like.rb', line 21 def @default_options ||= { send: "false", layout: "button_count", width: "450", action: "like", font: "arial", colorscheme: "light" }.merge("show-faces" => "false") end |
Instance Method Details
#like_button(app_id, options = {}) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/social_buttons/view_helpers/like.rb', line 7 def (app_id, = {}) clazz = SocialButtons::Like params = clazz.(clazz..merge()) params.merge!(class: CLASS) html = "".html_safe html << content_tag(:div, nil, id: "fb-root") html << clazz::Scripter.new(self).script(app_id, ) html << content_tag(:div, nil, params) html end |