Admin User Search - NoMethodError #1836

Closed
Davidslv opened this Issue Aug 7, 2012 · 5 comments

Comments

Projects
None yet
4 participants
Contributor

Davidslv commented Aug 7, 2012

Good Morning,

I have done a copy spree views and in admin/shared/_head.html.erb in line #13

    :user_search          => spree.admin_search_users_path(:format => 'json', :limit => 10)

Gives this error:

 undefined method `admin_search_users_path' for #<ActionDispatch::Routing::RoutesProxy:0x007f80413084c8>

I've looked into the commits and seems that there is no consensus if this should stay or be removed.

https://github.com/spree/spree/commits/master/core/app/views/spree/admin/shared/_head.html.erb

Member

radar commented Aug 9, 2012

Which version of Spree is this in? As far as I can tell, this route is defined in config/routes.rb like this in master:

namespace :admin do
  get '/search/users', :to => "search#users", :as => :search_users

Hi, i'm using spree 1.1.3.

As you can see this isn't working:

MethodError

Member

radar commented Aug 14, 2012

Your image is broken, but I'll take your word for it.

1.1.3 (branch 1-1-stable) makes use of the path helper without specifying it in the routes.

The old helper was deleted when the API was getting rebuilt,
but it snuck back in the next commit without the routes being updated..

Member

radar commented Oct 17, 2012

I am unable to reproduce this problem on the 1-1-stable branch and furthermore I am unable to find reference to "admin_search_users_path" anywhere inside of Spree for that version of Spree.

If this problem is still persisting on 1-1-stable for you, please ping me again, providing exact steps to reproduce this issue and I will re-open it and deal with it.

Thanks!

@radar radar closed this Oct 17, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment