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

Default sort order should use primary_key (not id) #235

Closed
gregbell opened this issue Jun 29, 2011 · 0 comments
Closed

Default sort order should use primary_key (not id) #235

gregbell opened this issue Jun 29, 2011 · 0 comments
Assignees
Milestone

Comments

@gregbell
Copy link
Contributor

Currently, if you customize the primary key in an Active Record object, the sorting will raise an exception.

Instead of using a global #default_sort_order, it should get one from the model

  # lib/active_admin/resource.rb
    def default_options
      {
        :namespace  => ActiveAdmin.application.default_namespace,
        :sort_order => ActiveAdmin.application.default_sort_order
      }
    end
@ghost ghost assigned gregbell Jun 29, 2011
whatthewhat pushed a commit to whatthewhat/active_admin that referenced this issue Aug 13, 2011
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

No branches or pull requests

1 participant