{"issue":{"state":"open","created_at":"2011-08-09T20:07:16Z","updated_at":"2011-11-22T21:07:03Z","comments":7,"user":{"gravatar_id":"9c96a04fb24ba639170cef9f459058a2","id":294866,"url":"https://api.github.com/users/amoslanka","login":"amoslanka","avatar_url":"https://secure.gravatar.com/avatar/9c96a04fb24ba639170cef9f459058a2?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"body":"If I have declared a default order using the following line in an ActiveRecord model\r\n\r\n    default_scope :order => :title\r\n\r\nAnd then attempt to sort that resource's index page by clicking a column head, the sql generated:\r\n\r\n    SELECT `somethings`.* FROM `somethings` ORDER BY title, somethings.id DESC\r\n\r\nshows that the default_scope order takes precedence over the column head sort order. This likely should be reversed, the user's interaction should be given priority over default behavior of a Model. Is this possible?\r\n","assignee":null,"id":1375045,"number":352,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"labels":[{"name":"Feature","color":"02e10c","url":"https://api.github.com/repos/gregbell/active_admin/labels/Feature"}],"title":"ActiveRecord default_scope :order takes precedence over Index page table sort","html_url":"https://github.com/gregbell/active_admin/issues/352","closed_at":null,"url":"https://api.github.com/repos/gregbell/active_admin/issues/352","milestone":null},"action":"created","comment":{"created_at":"2011-11-22T21:07:03Z","updated_at":"2011-11-22T21:07:03Z","user":{"gravatar_id":"db5be96707e7f30ace02316d00fd75d9","id":13095,"url":"https://api.github.com/users/antoineherzog","login":"antoineherzog","avatar_url":"https://secure.gravatar.com/avatar/db5be96707e7f30ace02316d00fd75d9?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"body":"just a stupid question, how to set up a default sort in active admin ? thanx","id":2840678,"url":"https://api.github.com/repos/gregbell/active_admin/issues/comments/2840678"}}