Fix replying to diary comments, and tidy a few things up.
This commit is contained in:
parent
af1e733bee
commit
a47fcb0857
2 changed files with 6 additions and 4 deletions
|
@ -17,6 +17,8 @@ class MessageController < ApplicationController
|
|||
Notifier::deliver_message_notification(@message)
|
||||
redirect_to :controller => 'message', :action => 'inbox', :display_name => @user.display_name
|
||||
end
|
||||
else
|
||||
@title = params[:title]
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<% display_name = User.find_by_id(params[:user_id] || @user_id).display_name %>
|
||||
<% title = params[:message] ? params[:message][:title] : params[:title] %>
|
||||
<% user_id = params[:user_id] || @user_id %>
|
||||
<% display_name = User.find_by_id(user_id).display_name %>
|
||||
|
||||
<h2>Send a new message to <%= h(display_name) %></h2>
|
||||
|
||||
|
@ -10,11 +10,11 @@
|
|||
|
||||
<%= error_messages_for 'message' %>
|
||||
|
||||
<% form_for :message, :url => {:user_id => params[:user_id] || @user_id, :action => "new" } do |f| %>
|
||||
<% form_for :message, :url => { :action => "new", :user_id => user_id } do |f| %>
|
||||
<table>
|
||||
<tr valign="top">
|
||||
<th>Subject</th>
|
||||
<td><%= text_field_tag 'message[title]', title, :size => 60, :value => @title %></td>
|
||||
<td><%= f.text_field :title, :size => 60, :value => @title %></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<th>Body</th>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue