weixin_33739541 2014-06-17 09:56 采纳率: 0%
浏览 48

用redmine路由错误

I'm working with Redmine 2.4.5 and I've installed the better_gantt_chart plugin to not change the original Gantt. I'm making a js file to improve the plugin with drag and drop etc...
Here is my problem : when I'm trying to call a url with ajax to use a controller that I've created it's impossible, and I suppose that's because the better_gantt_char plugin is using patches and hooks but I don't really know.

Here is one of the codes I've tried:

routes.rb

put 'projects/wine-investment-network/issues/gantt', :to => 'better_gantt_charts#update_data'

match 'projects/wine-investment-network/issues/gantt'=> 'better_gantt_charts#update_data', via: :put

drag_drop.js

$.ajax({
      type: 'PUT',
      url: project_name + "/issues/gantt",    
      success: function() { /* ... */ },
      error: function() { /* ... */ }
    });

better_gantt_charts_controller

class BetterGanttChartsController < ApplicationController

unloadable

def update_data
...
end

And here is the error

Started PUT "/projects/wine-investment-network/issues/gantt" for 192.168.21.66 at 2014-06-17 12:02:00 +0200

ActionController::RoutingError (uninitialized constant BetterGanttChartsController):
  • 写回答

0条回答 默认 最新

    报告相同问题?