Sha256: 15fb35269adf464a5def51b3595ccd968ad44aefd0e17a40e69c3e4c19e20f52

Contents?: true

Size: 296 Bytes

Versions: 1

Compression:

Stored size: 296 Bytes

Contents

# frozen_string_literal: true

module ActiveFormModel
  module Virtual
    extend ActiveSupport::Concern

    include Permittable
    include ActiveModel::Model

    class_methods do
      def fields(*attrs)
        send(:attr_accessor, *attrs)
        permit(*attrs)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
active_form_model-0.5.1 lib/active_form_model/virtual.rb