Sha256: 33bb1962d6c65d1fec74b1848db1696e208767a89fd08326c620a5c8c5bae55c

Contents?: true

Size: 583 Bytes

Versions: 87

Compression:

Stored size: 583 Bytes

Contents

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(object) }, options)
        end
      end
    end
  end
end

Version data entries

87 entries across 85 versions & 10 rubygems

Version Path
actionview-4.2.11.3 lib/action_view/helpers/tags/text_area.rb
actionview-4.2.11.2 lib/action_view/helpers/tags/text_area.rb
actionview-5.0.7.2 lib/action_view/helpers/tags/text_area.rb
actionview-4.2.11.1 lib/action_view/helpers/tags/text_area.rb
actionview-5.0.7.1 lib/action_view/helpers/tags/text_area.rb
actionview-4.2.11 lib/action_view/helpers/tags/text_area.rb
actionview-5.0.7 lib/action_view/helpers/tags/text_area.rb
actionview-4.2.10 lib/action_view/helpers/tags/text_area.rb
actionview-4.2.10.rc1 lib/action_view/helpers/tags/text_area.rb
actionview-5.0.6 lib/action_view/helpers/tags/text_area.rb
actionview-5.0.6.rc1 lib/action_view/helpers/tags/text_area.rb
actionview-5.0.5 lib/action_view/helpers/tags/text_area.rb
actionview-5.0.5.rc2 lib/action_view/helpers/tags/text_area.rb
actionview-5.0.5.rc1 lib/action_view/helpers/tags/text_area.rb
actionview-4.2.9 lib/action_view/helpers/tags/text_area.rb
actionview-4.2.9.rc2 lib/action_view/helpers/tags/text_area.rb
actionview-5.0.4 lib/action_view/helpers/tags/text_area.rb
actionview-5.0.4.rc1 lib/action_view/helpers/tags/text_area.rb
actionview-4.2.9.rc1 lib/action_view/helpers/tags/text_area.rb
actionview-5.0.3 lib/action_view/helpers/tags/text_area.rb