Sha256: d17ee29d48d913a8945c3c6b6a50fd1dfe0f198d023ad93c6d236cf239704930

Contents?: true

Size: 464 Bytes

Versions: 11

Compression:

Stored size: 464 Bytes

Contents

require 'active_support/concern'

#
module ActiveAdmin
  #
  module Reform
    # Defines form class accessor
    module Resource
      extend ActiveSupport::Concern

      included do
        attr_accessor :form_class_name
      end

      # @return [nil, Class<Reform::Form>]
      def form_class
        ActiveSupport::Dependencies.constantize(form_class_name) if form_class_name
      end
    end

    ::ActiveAdmin::Resource.send(:include, Resource)
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
activeadmin-reform-1.1.0 lib/active_admin/reform/resource.rb
activeadmin-reform-1.0.0 lib/active_admin/reform/resource.rb
activeadmin-reform-0.6.0 lib/active_admin/reform/resource.rb
activeadmin-reform-0.5.0 lib/active_admin/reform/resource.rb
activeadmin-reform-0.4.0 lib/active_admin/reform/resource.rb
activeadmin-reform-0.3.0 lib/active_admin/reform/resource.rb
activeadmin-reform-0.2.1 lib/active_admin/reform/resource.rb
activeadmin-reform-0.2.0 lib/active_admin/reform/resource.rb
activeadmin-reform-0.1.4 lib/active_admin/reform/resource.rb
activeadmin-reform-0.1.2 lib/active_admin/reform/resource.rb
activeadmin-reform-0.1.1 lib/active_admin/reform/resource.rb