RoR3: nested namespace routes, undefined method error
I am using namespace routes to create an admin section.
The problem is that the moment I moved un-namespaced and working controllers into the /admin namespace, I suddenly get an undefined methods error.
Showing
/media/_portable_/appname/vendor/plugins/active_scaffold/frontends/default/views/_form_messages.html.erb where line #4 raised:
undefined method `errors' for :record:Symbol
Extracted source (around line #4):
1: <%= render :partial => 'messages' %>
2:
3: <% unless @record.nil? %>
4: <%= error_messages_for :record, :object_name => @record.class.model_name.human开发者_开发百科.downcase %>
5: <% end %>
routes.rb
namespace :admin do
root :controller => 'dashboard', :action => "index"
resources :dashboard, :users, :apps do
as_routes
end
resources :admin_sessions, :only => [:new, :create, :destroy]
end
Any help on how I can fix this?
https://github.com/vhochstein/active_scaffold/issues/closed#issue/57
精彩评论