Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

url is not accessible for twitter, parameterize it

  • Loading branch information...
commit 098866686c8a7f619f4122b53c23a900113c58a6 1 parent 70fefe7
@iffyuva authored
Showing with 3 additions and 4 deletions.
  1. +3 −4 lib/social_buttons/view_helpers/tweet.rb
View
7 lib/social_buttons/view_helpers/tweet.rb
@@ -7,6 +7,7 @@ module Tweet
def tweet_button(options = {})
clazz = SocialButtons::Tweet
+ params.merge!(url: request.url)
params = clazz.options_to_data_params(clazz.default_options.merge(options))
params.merge!(class: CLASS)
@@ -19,7 +20,6 @@ def tweet_button(options = {})
class << self
def default_options
@default_options ||= {
- url: request.url,
via: "tweetbutton",
text: "",
count: "vertical",
@@ -33,13 +33,12 @@ class Scripter < SocialButtons::Scripter
def script
return empty_content if widgetized? :tweet
widgetized! :tweet
-
"<script src=#{twitter_wjs} type='text/javascript'></script>".html_safe
end
- def twitter_wjs
+ def twitter_wjs
"http://platform.twitter.com/widgets.js"
end
end # class
end
-end
+end
Please sign in to comment.
Something went wrong with that request. Please try again.