Skip to content

Commit 7983de8

Browse files
author
sandramu26
committed
Fix external post tags
1 parent 5aea30e commit 7983de8

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

Diff for: .env

+3-1
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,6 @@ TWITTER_CONSUMER_KEY='1k3IW3TBuAgIFRrNieGNIbJka'
1414
TWITTER_CONSUMER_SECRET='yDwjEx8b16CJ1JZYIze2N1HnfvNkLHJX1HVsy1m4PUsZMCDo5J'
1515
TWITTER_ACCESS_TOKEN='3302775980-goahLve7pwL5RucNtb2UR3kVHj7F66LhjqLMCJf'
1616
TWITTER_ACCESS_SECRET='jjKsUZFECizNnjZnuG3pMmXrdp1nBY449y3HhXVnrGsuy'
17-
MAIL_NOTIFICATION='[email protected]'
17+
MAIL_NOTIFICATION='[email protected]'
18+
CLIENT_KEY= ''
19+
ACCESS_TOKEN= ''

Diff for: app/controllers/posts_controller.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def create
3333
respond_to do |format|
3434
if @post.save
3535
@post.create_tags_from_tag_string
36-
format.html { redirect_to @post, notice: 'Post was successfully created.' }
36+
format.html { redirect_to post_path(@post), notice: 'Post was successfully created.' }
3737
format.json { render action: 'show', status: :created, location: @post }
3838
else
3939
format.html { render action: 'new' }

Diff for: app/helpers/post_location_helper.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ def link_to_post(post)
1010
def show_votes(post)
1111
if post.type == "InternalPost"
1212
if post.has_voted?(current_user)
13-
("<span class='glyphicon glyphicon-chevron-up'></span><br/>" +
13+
("<span class='fa fa-chevron-up'></span><br/>" +
1414
"<span> #{post.votes.count} </span><br/>" +
1515
"<span class='small'>votes</span>").html_safe
1616
else
1717
link_to vote_post_path(post), method: :put do
18-
("<span class='glyphicon glyphicon-chevron-up'></span><br/>" +
18+
("<span class='fa fa-chevron-up'></span><br/>" +
1919
"<span> #{post.votes.count} </span><br/>" +
2020
"<span class='small'>votes</span>").html_safe
2121
end

Diff for: app/views/posts/_list.html.erb

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
<tbody>
33
<% @posts.each do |post| %>
44
<tr>
5-
<td>
6-
<span class="badge pull-right" title="<%= pluralize(post.number_of_comments, 'comment') %>"><%= post.number_of_comments %></span>
5+
<td>
76
<%= link_to_post(post) %>
87
<br><span class="text-muted">Submitted by <%= post.username %> on <%= post.created_at.strftime("%m/%d/%Y") %></span>
98
<div class="tags">

0 commit comments

Comments
 (0)