El 30-11-2014 18:46, Jason Fleetwood-Boldt escribió: 

> I'm having a strange issue where all the links on my page are going to a 
> strange route (specifically, a route that exists in my app but is not 
> associated with AS in any way, see below) 
> 
> My page loads correctly at: 
> 
> http://127.0.0.1:3000/admin/scaffold/orders [1] 
> 
> Every link (Edit, Search, all the pagination links) go to something like: 
> 
> http://127.0.0.1:3000/orders/populate?action=edit&controller=admin_scaffold%2Forders&id=R345160226
>  [2] 
> 
> /orders/populate is a route in my app, but it has nothing to do with Active 
> Scaffold. As far as I can see, the links should be simply to 
> /admin/scaffold/orders, but for some reason they are coming out to 
> /orders/populate. 
> 
> Any clues as to what is happening here? 
> 
> Here's the base class to that object: 
> 
> class Admin::Scaffold::BaseController < Spree::BaseController
> 
> layout 'admin/scaffold/layouts/admin_application.html.erb'
> protected
> 
> def self.active_scaffold_controller_for(klass)
> return "Spree::#{klass}Controller".constantize rescue super
> end
> end

This line is confusing me, what controllers for Order do you have?
default active_scaffold_controller_for try first for controller in
current namespace (Admin::Scaffold::OrdersController) and then with no
namespace (OrdersController). 
However it's weird generate a route with a controller param. Can you
post your OrdersController, in every namespace, and their routes, in
same order as your config/routes.rb file? 
 

Links:
------
[1] http://127.0.0.1:3000/admin/scaffold/orders
[2]
http://127.0.0.1:3000/orders/populate?action=edit&amp;controller=admin_scaffold%2Forders&amp;id=R345160226

-- 
You received this message because you are subscribed to the Google Groups 
"ActiveScaffold : Ruby on Rails Gem" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/activescaffold.
For more options, visit https://groups.google.com/d/optout.

Reply via email to