[2013-09-24 19:15:34.691127][8060] ActionController::RoutingError (No route matches {:action=>"show", :controller=>"projects", :id=>nil}):
[2013-09-24 19:15:34.691127][8060] app/controllers/attachments_controller.rb:114:in `block (2 levels) in destroy'
[2013-09-24 19:15:34.691127][8060] app/controllers/attachments_controller.rb:113:in `destroy'
private
def find_project
@attachment = Attachment.find(params[:id])
# Show 404 if the filename in the url is wrong
raise ActiveRecord::RecordNotFound if params[:filename] && params[:filename] != @attachment.filename
@project = @attachment.project
rescue ActiveRecord::RecordNotFound
render_404
end
redmine_knowledgebase プラグインにおいて、添付ファイル削除時に「Page not found」エラーが発生してしまいます。
app/models/kb_article.rb (~line 45):
def project
nil
end
change to
def project
true
end
def project#trueProject.new # fake projectend