Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sort not working on master #42

Closed
mabotelh opened this issue May 28, 2013 · 8 comments · Fixed by #51
Closed

Sort not working on master #42

mabotelh opened this issue May 28, 2013 · 8 comments · Fixed by #51

Comments

@mabotelh
Copy link

Although the order is passed in, the table in the index page is not ordered.

@mabotelh
Copy link
Author

This seems to have been created in the last commit. Undoing it though throws an ugly exception about InheritedResources::Base not being known. I'll keep digging and if I find a solution, I'll submit a pull request.

@elia
Copy link
Member

elia commented May 29, 2013

Thanks, a failing spec would also be very appreciated! :)

@mabotelh
Copy link
Author

I will look to see if we can reuse ActiveAdmin's.

Sent from my iPhone

On May 29, 2013, at 7:52 AM, Elia Schito notifications@github.com wrote:

Thanks, a failing spec would also be very appreciated! :)


Reply to this email directly or view it on GitHub.

@mabotelh
Copy link
Author

The issue is in ActiveAdmin::ResourceController::DataAccess#apply_sorting. I tried to monkey patch it but I keep getting the following error which I don't know how to solve.

/Users/mauro/.rvm/gems/ruby-1.9.3-p392@corndog/gems/activeadmin-0.6.0/lib/active_admin/base_controller/authorization.rb:21:in `<module:ActiveAdmin>': uninitialized constant InheritedResources::Base (NameError)
    from /Users/mauro/.rvm/gems/ruby-1.9.3-p392@corndog/gems/activeadmin-0.6.0/lib/active_admin/base_controller/authorization.rb:1:in `<top (required)>'
    from /Users/mauro/.rvm/gems/ruby-1.9.3-p392@corndog/gems/activeadmin-0.6.0/lib/active_admin/base_controller.rb:3:in `<top (required)>'
    from /Users/mauro/.rvm/gems/ruby-1.9.3-p392@corndog/gems/activeadmin-0.6.0/lib/active_admin/resource_controller/actions.rb:2:in `<module:ActiveAdmin>'
    from /Users/mauro/.rvm/gems/ruby-1.9.3-p392@corndog/gems/activeadmin-0.6.0/lib/active_admin/resource_controller/actions.rb:1:in `<top (required)>'
    from /Users/mauro/.rvm/gems/ruby-1.9.3-p392@corndog/gems/activeadmin-0.6.0/lib/active_admin/resource_controller.rb:2:in `<top (required)>'
    from /Users/mauro/Projects/activeadmin-mongoid/lib/active_admin/mongoid/data_access.rb:1:in `<top (required)>'
    from /Users/mauro/Projects/activeadmin-mongoid/lib/active_admin/mongoid.rb:11:in `<top (required)>'
    from /Users/mauro/Projects/activeadmin-mongoid/lib/activeadmin-mongoid.rb:1:in `<top (required)>'
    from /Users/mauro/.rvm/gems/ruby-1.9.3-p392@global/gems/bundler-1.2.3/lib/bundler/runtime.rb:68:in `require'
    from /Users/mauro/.rvm/gems/ruby-1.9.3-p392@global/gems/bundler-1.2.3/lib/bundler/runtime.rb:68:in `block (2 levels) in require'
    from /Users/mauro/.rvm/gems/ruby-1.9.3-p392@global/gems/bundler-1.2.3/lib/bundler/runtime.rb:66:in `each'
    from /Users/mauro/.rvm/gems/ruby-1.9.3-p392@global/gems/bundler-1.2.3/lib/bundler/runtime.rb:66:in `block in require'
    from /Users/mauro/.rvm/gems/ruby-1.9.3-p392@global/gems/bundler-1.2.3/lib/bundler/runtime.rb:55:in `each'
    from /Users/mauro/.rvm/gems/ruby-1.9.3-p392@global/gems/bundler-1.2.3/lib/bundler/runtime.rb:55:in `require'
    from /Users/mauro/.rvm/gems/ruby-1.9.3-p392@global/gems/bundler-1.2.3/lib/bundler.rb:128:in `require'
    from /Users/mauro/Projects/Corndog/config/application.rb:17:in `<top (required)>'
    from /Users/mauro/.rvm/gems/ruby-1.9.3-p392@corndog/gems/railties-3.2.12/lib/rails/commands.rb:53:in `require'
    from /Users/mauro/.rvm/gems/ruby-1.9.3-p392@corndog/gems/railties-3.2.12/lib/rails/commands.rb:53:in `block in <top (required)>'
    from /Users/mauro/.rvm/gems/ruby-1.9.3-p392@corndog/gems/railties-3.2.12/lib/rails/commands.rb:50:in `tap'
    from /Users/mauro/.rvm/gems/ruby-1.9.3-p392@corndog/gems/railties-3.2.12/lib/rails/commands.rb:50:in `<top (required)>'
    from script/rails:6:in `require'
    from script/rails:6:in `<main>'

bartoszkopinski pushed a commit to bartoszkopinski/activeadmin-mongoid that referenced this issue Jul 22, 2013
@jeremylynch
Copy link

solution works great, thanks @bartoszkopinski

bartoszkopinski pushed a commit to bartoszkopinski/activeadmin-mongoid that referenced this issue Aug 19, 2013
@bartoszkopinski
Copy link
Contributor

So I managed to have sorting + filtering working on my branch now but didn't have time to test it. Feel free to use the changes if needed: bartoszkopinski/activeadmin-mongoid@elia:master...master

@elia
Copy link
Member

elia commented Aug 22, 2013

@bartoszkopinski can you send me a PR? I'll merge straight away if travis 🚥 agrees :)

elia pushed a commit that referenced this issue Aug 22, 2013
- no-collection case
- filtering for sorting
- conflict with simple_form
@elia
Copy link
Member

elia commented Aug 22, 2013

Closing, any discussion should move to #51

@elia elia closed this as completed Aug 22, 2013
@elia elia mentioned this issue Aug 22, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants