Sha256: 6f4af8e70864701e29bafe1649fc16ce94ed27009ccf2827578be99484973148

Contents?: true

Size: 598 Bytes

Versions: 1

Compression:

Stored size: 598 Bytes

Contents

# frozen_string_literal: true

require 'reform/form/coercion'
require 'reform/form/dry'

module Pragma
  module Contract
    # This is the base contract that all of your resource-specific contracts should inherit from.
    #
    # It's just an extension of +Reform::Form+ with some helper methods for coercion.
    #
    # @author Alessandro Desantis
    class Base < Reform::Form
      feature Reform::Form::Coercion
      feature Pragma::Contract::Coercion
      feature Reform::Form::Dry
      feature Pragma::Contract::ModelFinder

      property :current_user, virtual: true
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pragma-contract-2.1.1 lib/pragma/contract/base.rb