Sha256: 8753b1e942ec9e8cf9cb4bc56ef59e31c5da20dfb3009692ef090b7099f4b405

Contents?: true

Size: 415 Bytes

Versions: 1

Compression:

Stored size: 415 Bytes

Contents

module ActiveAdmin::Mongoid::Document
  extend ActiveSupport::Concern
  
  module ClassMethods
    def content_columns
      @content_columns ||= fields.map(&:second).select {|f| f.name !~ /(^_|^(created|updated)_at)/}
    end

    def columns
      @columns ||= fields.map(&:second)
    end
    
    def reorder *args
      scoped
    end
  end
end

Mongoid::Document.send :include, ActiveAdmin::Mongoid::Document

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
activeadmin-mongoid-0.0.2.jpmckinney.0 lib/active_admin/mongoid/document.rb