Reputation: 19284
I'm trying to access the dashboard in my refinerycms app and I'm getting the following error:
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'
group fitness classes is an engine I created.
Apparently if I try to add/edit/delete a group fitness class I get errors too.
Here's the error I get when trying to delete a group fitness class:
NoMethodError in Refinery::GroupFitnessClasses::Admin::GroupFitnessClassesController#destroy
undefined method `name' for #<Refinery::GroupFitnessClasses::GroupFitnessClass:0x0000000c8e6ed8>
Rails.root: /var/www/vhosts/tomstestsite.us/PersonalTrainingKT
UPDATE
I Changed my group_fitness_classes_controller from
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
to
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 fixed the adding and deleting issues. Now it's the editing issue still.
Upvotes: 1
Views: 785
Reputation: 1873
This was a bug in Refinery that I've just fixed and will release version 2.0.6 for. Before that is out you can fix the problem in your application by placing this in your Gemfile:
gem 'refinerycms', :git => 'git://github.com/resolve/refinerycms.git', :branch => '2-0-stable'
This will use the git version until the gem is released (though this will happen today).
Thanks for your help in tracking down and fixing this bug over chat!
Phil
Upvotes: 1
Reputation: 2151
It looks like you have a typo somewhere. Look at your first error:
undefined method `edit_group_fitness_classes_admin_group_fitness_clas_path'
should be
edit_group_fitness_classes_admin_group_fitness_class_path
Upvotes: 0