Permalink
Browse files

Merge pull request #163 from t-bullock/admin-messages-fix

fix some links on admin messages page
  • Loading branch information...
2 parents 6131753 + 0d83519 commit f199b2d73ac2181de3f166593a0d623309e5116b @bborn committed Mar 2, 2014
Showing with 3 additions and 3 deletions.
  1. +1 −1 app/controllers/messages_controller.rb
  2. +2 −2 app/views/messages/_sent.html.haml
@@ -23,7 +23,7 @@ def index
end
def show
- @message = Message.read(params[:id], current_user)
+ @message = Message.read(params[:id], @user)
@message_thread = MessageThread.for(@message, (admin? ? @message.recipient : current_user ))
@reply = Message.new_reply(@user, @message_thread, params)
end
@@ -18,11 +18,11 @@
.photo= link_to image_tag( message.recipient.avatar_photo_url(:thumb), "height"=>"50px", "alt"=>"#{message.recipient.login}", "width"=>"50px" ), user_path(message.recipient), :title => :users_profile.l(:user => message.recipient.login)
%td
- = link_to h(message.subject), user_message_path(@user, message)
+ = link_to h(message.subject), user_message_path(message.sender, message)
%br
= :to.l
\:
- = link_to h(message.recipient.login), user_path(@user)
+ = link_to h(message.recipient.login), user_path(message.recipient)
%td.meta{:width => '150px'}
= time_ago_in_words_or_date(message.created_at)

0 comments on commit f199b2d

Please sign in to comment.