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

Already on GitHub? Sign in to your account

Add sorting #51

Merged
merged 1 commit into from Aug 23, 2013

Conversation

Projects
None yet
2 participants
Member

elia commented Aug 22, 2013

Taken from @bartoszkopinski (original compare)

  • no-collection case
  • filtering for sorting
  • conflict with simple_form

fixes #42

Add sorting, fixes #42
- no-collection case
- filtering for sorting
- conflict with simple_form

@elia elia commented on the diff Aug 22, 2013

lib/active_admin/mongoid/document.rb
@@ -5,14 +5,6 @@ module ActiveAdmin::Mongoid::Document
extend ActiveSupport::Concern
- # INSTANCE METHODS
-
- # Returns the column object for the named attribute.
- def column_for_attribute(name)
- self.class.columns_hash[name.to_s]
- end
-
-
@elia

elia Aug 22, 2013

Member

@bartoszkopinski what kind of conflict is was generating with simpleform?

@bartoszkopinski

bartoszkopinski Aug 23, 2013

Contributor

I was getting ActionView::Template::Error: undefined method 'number?' for #<ActiveAdmin::Mongoid::Document::ColumnWrapper:0x0000000bfa4ca8>
for

= f.input :email, required: true, autofocus: true, hint: false, label: false, input_html: { placeholder: "Email" }

not sure what the reason was, so this is rather a quick fix.

@elia elia referenced this pull request Aug 22, 2013

Closed

Sort not working on master #42

elia added a commit that referenced this pull request Aug 23, 2013

@elia elia merged commit aa057b5 into master Aug 23, 2013

1 check passed

default The Travis CI build passed
Details

@elia elia deleted the sorting branch Aug 23, 2013

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