diff options
Diffstat (limited to 'app/views/messages')
-rw-r--r-- | app/views/messages/edit.html.erb | 12 | ||||
-rw-r--r-- | app/views/messages/new.html.erb | 2 | ||||
-rw-r--r-- | app/views/messages/show.html.erb | 2 |
3 files changed, 9 insertions, 7 deletions
diff --git a/app/views/messages/edit.html.erb b/app/views/messages/edit.html.erb index 054297cee..362f1b6b9 100644 --- a/app/views/messages/edit.html.erb +++ b/app/views/messages/edit.html.erb @@ -2,11 +2,13 @@ :action => 'show', :project_id => @project, :id => @board %> » <%= h @message.subject %></h2> -<% form_for :message, @message, - :url => {:action => 'edit'}, - :html => {:multipart => true, - :id => 'message-form', - :method => :post} do |f| %> +<%= form_for @message, { + :as => :message, + :url => {:action => 'edit'}, + :html => {:multipart => true, + :id => 'message-form', + :method => :post} + } do |f| %> <%= render :partial => 'form', :locals => {:f => f, :replying => !@message.parent.nil?} %> <%= submit_tag l(:button_save) %> diff --git a/app/views/messages/new.html.erb b/app/views/messages/new.html.erb index f41e27079..f1dddb6f5 100644 --- a/app/views/messages/new.html.erb +++ b/app/views/messages/new.html.erb @@ -1,6 +1,6 @@ <h2><%= link_to h(@board.name), :controller => 'boards', :action => 'show', :project_id => @project, :id => @board %> » <%= l(:label_message_new) %></h2> -<% form_for :message, @message, :url => {:action => 'new'}, :html => {:multipart => true, :id => 'message-form'} do |f| %> +<%= form_for @message, :url => {:action => 'new'}, :html => {:multipart => true, :id => 'message-form'} do |f| %> <%= render :partial => 'form', :locals => {:f => f} %> <%= submit_tag l(:button_create) %> <%= link_to_remote l(:label_preview), diff --git a/app/views/messages/show.html.erb b/app/views/messages/show.html.erb index 9edc8451f..d0857cf46 100644 --- a/app/views/messages/show.html.erb +++ b/app/views/messages/show.html.erb @@ -72,7 +72,7 @@ <% if !@topic.locked? && authorize_for('messages', 'reply') %> <p><%= toggle_link l(:button_reply), "reply", :focus => 'message_content' %></p> <div id="reply" style="display:none;"> -<% form_for :reply, @reply, :url => {:action => 'reply', :id => @topic}, :html => {:multipart => true, :id => 'message-form'} do |f| %> +<%= form_for @reply, :as => :reply, :url => {:action => 'reply', :id => @topic}, :html => {:multipart => true, :id => 'message-form'} do |f| %> <%= render :partial => 'form', :locals => {:f => f, :replying => true} %> <%= submit_tag l(:button_submit) %> <%= link_to_remote l(:label_preview), |