Sha256: 7057635c3f50a2edda5e23a758cdc9e9cddc63fa0fae053a63b5326f54124d6e

Contents?: true

Size: 606 Bytes

Versions: 249

Compression:

Stored size: 606 Bytes

Contents

# frozen_string_literal: true

require "action_view/helpers/tags/placeholderable"

module ActionView
  module Helpers
    module Tags # :nodoc:
      class TextArea < Base # :nodoc:
        include Placeholderable

        def render
          options = @options.stringify_keys
          add_default_name_and_id(options)

          if size = options.delete("size")
            options["cols"], options["rows"] = size.split("x") if size.respond_to?(:split)
          end

          content_tag("textarea", options.delete("value") { value_before_type_cast }, options)
        end
      end
    end
  end
end

Version data entries

249 entries across 236 versions & 16 rubygems

Version Path
actionview-8.0.0 lib/action_view/helpers/tags/text_area.rb
actionview-7.2.2 lib/action_view/helpers/tags/text_area.rb
actionview-7.1.5 lib/action_view/helpers/tags/text_area.rb
actionview-8.0.0.rc2 lib/action_view/helpers/tags/text_area.rb
actionview-7.2.1.2 lib/action_view/helpers/tags/text_area.rb
actionview-7.1.4.2 lib/action_view/helpers/tags/text_area.rb
actionview-7.0.8.6 lib/action_view/helpers/tags/text_area.rb
actionview-6.1.7.10 lib/action_view/helpers/tags/text_area.rb
actionview-8.0.0.rc1 lib/action_view/helpers/tags/text_area.rb
actionview-6.1.7.9 lib/action_view/helpers/tags/text_area.rb
actionview-7.2.1.1 lib/action_view/helpers/tags/text_area.rb
actionview-7.1.4.1 lib/action_view/helpers/tags/text_area.rb
actionview-7.0.8.5 lib/action_view/helpers/tags/text_area.rb
actionview-8.0.0.beta1 lib/action_view/helpers/tags/text_area.rb
omg-actionview-8.0.0.alpha9 lib/action_view/helpers/tags/text_area.rb
omg-actionview-8.0.0.alpha8 lib/action_view/helpers/tags/text_area.rb
omg-actionview-8.0.0.alpha7 lib/action_view/helpers/tags/text_area.rb
omg-actionview-8.0.0.alpha4 lib/action_view/helpers/tags/text_area.rb
omg-actionview-8.0.0.alpha3 lib/action_view/helpers/tags/text_area.rb
omg-actionview-8.0.0.alpha2 lib/action_view/helpers/tags/text_area.rb