我正在尝试访问我的refinerycms 应用程序中的仪表板,但出现以下错误:
NoMethodError in Refinery/admin/dashboard#index
Showing /var/www/vhosts/tomstestsite.us/PersonalTrainingKT/app/views/refinery/admin/dashboard/_recent_activity.html.erb where line #4 raised:
undefined method `edit_group_fitness_classes_admin_group_fitness_clas_path' for #<ActionDispatch::Routing::RoutesProxy:0x0000000f11bfc0>
Extracted source (around line #4):
1: <div id='recent_activity'>
2: <h2><%= t('.latest_activity') %></h2>
3: <% if (activity = @recent_activity.collect { |a|
4: activity_message_for(a)
5: }.reject(&:blank?)).present? %>
6: <ul class='clickable'>
7: <% activity.each do |message| %>
Trace of template inclusion: app/views/refinery/admin/dashboard/_records.html.erb, app/views/refinery/admin/dashboard/index.html.erb
Rails.root: /var/www/vhosts/tomstestsite.us/PersonalTrainingKT
Application Trace | Framework Trace | Full Trace
app/views/refinery/admin/dashboard/_recent_activity.html.erb:4:in `block in _app_views_refinery_admin_dashboard__recent_activity_html_erb__1848110473525801039_122287880'
app/views/refinery/admin/dashboard/_recent_activity.html.erb:3:in `collect'
app/views/refinery/admin/dashboard/_recent_activity.html.erb:3:in `_app_views_refinery_admin_dashboard__recent_activity_html_erb__1848110473525801039_122287880'
app/views/refinery/admin/dashboard/_records.html.erb:1:in `_app_views_refinery_admin_dashboard__records_html_erb__4550726393400955740_116529040'
app/views/refinery/admin/dashboard/index.html.erb:3:in `_app_views_refinery_admin_dashboard_index_html_erb__2977375506195649235_124556040'
团体健身课程是我创建的引擎。
显然,如果我尝试添加/编辑/删除团体健身课程,我也会遇到错误。
这是我在尝试删除团体健身课程时遇到的错误:
NoMethodError in Refinery::GroupFitnessClasses::Admin::GroupFitnessClassesController#destroy
undefined method `name' for #<Refinery::GroupFitnessClasses::GroupFitnessClass:0x0000000c8e6ed8>
Rails.root: /var/www/vhosts/tomstestsite.us/PersonalTrainingKT
更新
我改变了我的 group_fitness_classes_controller 从
module Refinery
module GroupFitnessClasses
module Admin
class GroupFitnessClassesController < ::Refinery::AdminController
crudify :'refinery/group_fitness_classes/group_fitness_class', :title_attribute => 'name', :xhr_paging => true
end
end
end
end
到
module Refinery
module GroupFitnessClasses
module Admin
class GroupFitnessClassesController < ::Refinery::AdminController
crudify :'refinery/group_fitness_classes/group_fitness_class', :title_attribute => 'title', :xhr_paging => true
end
end
end
end 修复了添加和删除问题。现在仍然是编辑问题。