Sha256: dc74b917eb975a69aa20e4e0e9717bc0b8dc179e2bb4a315779ca0f850489c29

Contents?: true

Size: 445 Bytes

Versions: 9

Compression:

Stored size: 445 Bytes

Contents

require 'representable/decorator/coercion'

class Reform::Form
  module Coercion
    def self.included(base)
      base.extend(ClassMethods)
    end

    module ClassMethods
      def representer_class
        super.class_eval do
          include Representable::Decorator::Coercion unless self < Representable::Decorator::Coercion # DISCUSS: include it once. why do we have to check this?
          self
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
reform-0.2.7 lib/reform/form/coercion.rb
reform-0.2.6 lib/reform/form/coercion.rb
reform-0.2.5 lib/reform/form/coercion.rb
reform-0.2.4 lib/reform/form/coercion.rb
reform-0.2.3 lib/reform/form/coercion.rb
reform-0.2.2 lib/reform/form/coercion.rb
reform-0.2.1 lib/reform/form/coercion.rb
reform-0.2.0 lib/reform/form/coercion.rb
reform-0.1.2 lib/reform/form/coercion.rb