メッセージシステム用のRedmineプラグインを作成しました。メッセージとともに、ユーザーはファイルを添付できます。そのために、既存のAttachmentsHelperを使用しようとしています。
これが私のサンプルコードです
index.html.erbで
<% if not @members.blank? %>
<% form_for :note, @note, :url => {:action => 'create', :project_id => @project.id}, :html => {:multipart => true, :id => 'note-form'} do |f| %>
<%= f.hidden_field :p_id, :value => @project.id %>
<p><%= f.text_area :content, :cols => 40, :rows => 6, :class => 'wiki-edit', :id => 'message_content' %></p>
<p> <%= render :partial => 'attachments/form' %></p>
<%= submit_tag l(:button_create) %>
<% end %>
<% end %>
私のcontroller.rbで
class CommunicationsController < ApplicationController
unloadable
include AttachmentsHelper
def create
#code for saving message
end
end
上記のコードが機能せず、エラーも発生しません。私は何が欠けていますか?
誰かがこの問題を解決するのを手伝ってくれますか?