Sha256: 6154ae1131f4e1753ac2fe4e6bb2b87812e00759fb7dc8538c6c03fa46a3ad3e

Contents?: true

Size: 419 Bytes

Versions: 19

Compression:

Stored size: 419 Bytes

Contents

# -*- encoding: utf-8 -*-
# -*- frozen_string_literal: true -*-
# -*- warn_indent: true -*-

module RailsBootstrapForm
  module Inputs
    module HiddenField
      extend ActiveSupport::Concern

      included do
        def hidden_field(attribute, options = {})
          options[:value] = object.send(attribute) unless options.key?(:value)

          super(attribute, options)
        end
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
rails_bootstrap_form-0.9.9 lib/rails_bootstrap_form/inputs/hidden_field.rb
rails_bootstrap_form-0.9.8 lib/rails_bootstrap_form/inputs/hidden_field.rb
rails_bootstrap_form-0.9.7 lib/rails_bootstrap_form/inputs/hidden_field.rb
rails_bootstrap_form-0.9.6 lib/rails_bootstrap_form/inputs/hidden_field.rb
rails_bootstrap_form-0.9.5 lib/rails_bootstrap_form/inputs/hidden_field.rb
rails_bootstrap_form-0.9.4 lib/rails_bootstrap_form/inputs/hidden_field.rb
rails_bootstrap_form-0.9.3 lib/rails_bootstrap_form/inputs/hidden_field.rb
rails_bootstrap_form-0.9.2 lib/rails_bootstrap_form/inputs/hidden_field.rb
rails_bootstrap_form-0.9.1 lib/rails_bootstrap_form/inputs/hidden_field.rb
rails_bootstrap_form-0.9.0 lib/rails_bootstrap_form/inputs/hidden_field.rb
rails_bootstrap_form-0.8.3 lib/rails_bootstrap_form/inputs/hidden_field.rb
rails_bootstrap_form-0.8.2 lib/rails_bootstrap_form/inputs/hidden_field.rb
rails_bootstrap_form-0.8.1 lib/rails_bootstrap_form/inputs/hidden_field.rb
rails_bootstrap_form-0.8.0 lib/rails_bootstrap_form/inputs/hidden_field.rb
rails_bootstrap_form-0.7.2 lib/rails_bootstrap_form/inputs/hidden_field.rb
rails_bootstrap_form-0.7.1 lib/rails_bootstrap_form/inputs/hidden_field.rb
rails_bootstrap_form-0.7.0 lib/rails_bootstrap_form/inputs/hidden_field.rb
rails_bootstrap_form-0.6.2 lib/rails_bootstrap_form/inputs/hidden_field.rb
rails_bootstrap_form-0.6.1 lib/rails_bootstrap_form/inputs/hidden_field.rb