Handle change from @to_user to @this_user for new message action
This commit is contained in:
parent
2b037e2892
commit
5270a07bc5
2 changed files with 3 additions and 3 deletions
|
@ -47,7 +47,7 @@ class MessageController < ApplicationController
|
|||
if message.to_user_id == @user.id then
|
||||
@body = "On #{message.sent_on} #{message.sender.display_name} wrote:\n\n#{message.body.gsub(/^/, '> ')}"
|
||||
@title = @subject = "Re: #{message.title.sub(/^Re:\s*/, '')}"
|
||||
@to_user = User.find(message.from_user_id)
|
||||
@this_user = User.find(message.from_user_id)
|
||||
|
||||
render :action => 'new'
|
||||
else
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<h2><%= raw(t'message.new.send_message_to', :name => link_to(h(@to_user.display_name), {:controller => 'user', :action => 'view', :display_name => @to_user.display_name})) %></h2>
|
||||
<h2><%= raw(t'message.new.send_message_to', :name => link_to(h(@this_user.display_name), {:controller => 'user', :action => 'view', :display_name => @this_user.display_name})) %></h2>
|
||||
|
||||
<%= error_messages_for 'message' %>
|
||||
|
||||
<%= form_for :message, :url => { :action => "new", :display_name => @to_user.display_name } do |f| %>
|
||||
<%= form_for :message, :url => { :action => "new", :display_name => @this_user.display_name } do |f| %>
|
||||
<table>
|
||||
<tr valign="top">
|
||||
<td class="fieldName"><%= t'message.new.subject' %></td>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue