forked from Raynes/rubeque
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
David Davis
committed
Mar 17, 2012
1 parent
2302813
commit 4cb4095
Showing
4 changed files
with
38 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
module SolutionsHelper | ||
|
||
def twitter_link(problem, gist) | ||
text = URI.escape("Check out my solution to #{problem.title} on #rubeque #{gist}") | ||
def twitter_link(problem, paste) | ||
url = "http://rubeque.com/problems/#{problem.id}" | ||
text = URI.escape("Check out my solution to '#{problem.title}' (#{url}) on #rubeque: #{paste}") | ||
link = "http://twitter.com/share?" | ||
link += "text=#{text}" | ||
link += "&url=#{URI.escape("http://rubeque.com/problems/#{problem.id}")}" | ||
link_to "Tweet your solution on Twitter", link | ||
link_to "Edit your tweet on Twitter", link, class: "twitter" | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,16 @@ | ||
<h1>Boast a Little</h1> | ||
<h1>Go Ahead And Boast A Little</h1> | ||
|
||
<h2>Direct Link to Share</h2> | ||
<p class="refheap"> | ||
<%= @paste %> | ||
</p> | ||
<div id="share"> | ||
<h2>Direct Link to Share</h2> | ||
<p class="refheap"> | ||
<%= text_field_tag "share_link", @paste, id: "solution-share-link" %> | ||
</p> | ||
|
||
<h2>Share on Twitter</h2> | ||
<p>Click below to visit Twitter.com where you'll be able to edit tweet and post your solution.</p> | ||
<p><%= twitter_link(@problem, @paste) %></p><br/> | ||
<h2 class="twitter">Share on Twitter</h2> | ||
<p>You'll be able to edit your tweet before it's posted. Click the link below to go to Twitter.</p> | ||
<p><%= twitter_link(@problem, @paste) %></p> | ||
|
||
<%= link_to "Back to Problem", problem_path(@problem) %> | ||
<div class="links"> | ||
<%= link_to "Back to Problem", problem_path(@problem) %> | ||
</div> | ||
</div> |