Sha256: 6bc5f28ebeddacaebb650b8a84321df65f4a0696a7a3ad2f1e4201501d5ac367

Contents?: true

Size: 489 Bytes

Versions: 58

Compression:

Stored size: 489 Bytes

Contents

module ActiveAdmin
  class ResourceController < BaseController
    module Decorators
      protected

      def resource
        decorator = active_admin_config.decorator_class
        resource = super
        decorator ? decorator.new(resource) : resource
      end

      def active_admin_collection
        decorator = active_admin_config.decorator_class
        collection = super
        decorator ? decorator.decorate_collection(collection) : collection
      end

    end
  end
end

Version data entries

58 entries across 58 versions & 4 rubygems

Version Path
activeadmin-0.6.6 lib/active_admin/resource_controller/decorators.rb
activeadmin-0.6.5 lib/active_admin/resource_controller/decorators.rb
activeadmin-0.6.4 lib/active_admin/resource_controller/decorators.rb
yousty-activeadmin-1.0.4.pre lib/active_admin/resource_controller/decorators.rb
yousty-activeadmin-1.0.3.pre lib/active_admin/resource_controller/decorators.rb
yousty-activeadmin-1.0.2.pre lib/active_admin/resource_controller/decorators.rb
activeadmin-0.6.3 lib/active_admin/resource_controller/decorators.rb
yousty-activeadmin-1.0.1.pre lib/active_admin/resource_controller/decorators.rb
yousty-activeadmin-1.0.0.pre lib/active_admin/resource_controller/decorators.rb
activeadmin-0.6.2 lib/active_admin/resource_controller/decorators.rb
activeadmin-0.6.1 lib/active_admin/resource_controller/decorators.rb
aa-rails4-0.6.0 lib/active_admin/resource_controller/decorators.rb
lalala-4.0.0.dev.141 vendor/deps/active_admin/lib/active_admin/resource_controller/decorators.rb
lalala-4.0.0.dev.136 vendor/deps/active_admin/lib/active_admin/resource_controller/decorators.rb
lalala-4.0.0.dev.135 vendor/deps/active_admin/lib/active_admin/resource_controller/decorators.rb
lalala-4.0.0.dev.134 vendor/deps/active_admin/lib/active_admin/resource_controller/decorators.rb
lalala-4.0.0.dev.133 vendor/deps/active_admin/lib/active_admin/resource_controller/decorators.rb
lalala-4.0.0.dev.132 vendor/deps/active_admin/lib/active_admin/resource_controller/decorators.rb
lalala-4.0.0.dev.131 vendor/deps/active_admin/lib/active_admin/resource_controller/decorators.rb
lalala-4.0.0.dev.129 vendor/deps/active_admin/lib/active_admin/resource_controller/decorators.rb