1

我正在尝试访问我的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 修复了添加和删除问题。现在仍然是编辑问题。

4

2 回答 2

1

这是我刚刚修复的炼油厂中的一个错误,并将发布 2.0.6 版。在此之前,您可以通过将其放在 Gemfile 中来解决应用程序中的问题:

gem 'refinerycms', :git => 'git://github.com/resolve/refinerycms.git', :branch => '2-0-stable'

这将使用 git 版本,直到 gem 发布(尽管这将在今天发生)。

感谢您通过聊天帮助跟踪和修复此错误!

菲尔

于 2012-07-25T01:13:20.783 回答
0

看起来你在某个地方有错字。看看你的第一个错误:

undefined method `edit_group_fitness_classes_admin_group_fitness_clas_path'

应该

edit_group_fitness_classes_admin_group_fitness_class_path
于 2012-07-23T18:10:25.437 回答