Sha256: 27324f5319f7e9d606b6a9d65c1e4263c3870df8e1153f190028017fad3e8d86

Contents?: true

Size: 579 Bytes

Versions: 79

Compression:

Stored size: 579 Bytes

Contents

module ActionView
  module Helpers
    module Tags # :nodoc:
      class SearchField < TextField # :nodoc:
        def render
          options = @options.stringify_keys

          if options["autosave"]
            if options["autosave"] == true
              options["autosave"] = request.host.split(".").reverse.join(".")
            end
            options["results"] ||= 10
          end

          if options["onsearch"]
            options["incremental"] = true unless options.has_key?("incremental")
          end

          super
        end
      end
    end
  end
end

Version data entries

79 entries across 79 versions & 5 rubygems

Version Path
actionview-4.1.10.rc2 lib/action_view/helpers/tags/search_field.rb
actionview-4.1.10.rc1 lib/action_view/helpers/tags/search_field.rb
actionview-4.1.9 lib/action_view/helpers/tags/search_field.rb
actionview-4.1.9.rc1 lib/action_view/helpers/tags/search_field.rb
actionview-4.2.0 lib/action_view/helpers/tags/search_field.rb
actionview-4.2.0.rc3 lib/action_view/helpers/tags/search_field.rb
actionview-4.2.0.rc2 lib/action_view/helpers/tags/search_field.rb
actionview-4.2.0.rc1 lib/action_view/helpers/tags/search_field.rb
actionview-4.1.7.1 lib/action_view/helpers/tags/search_field.rb
actionpack-4.0.11.1 lib/action_view/helpers/tags/search_field.rb
actionview-4.1.8 lib/action_view/helpers/tags/search_field.rb
actionpack-4.0.12 lib/action_view/helpers/tags/search_field.rb
actionview-4.2.0.beta4 lib/action_view/helpers/tags/search_field.rb
actionview-4.2.0.beta3 lib/action_view/helpers/tags/search_field.rb
actionview-4.1.7 lib/action_view/helpers/tags/search_field.rb
actionpack-4.0.11 lib/action_view/helpers/tags/search_field.rb
actionview-4.2.0.beta2 lib/action_view/helpers/tags/search_field.rb
nanumfont-rails-0.1 vendor/bundle/ruby/2.1.0/gems/actionview-4.1.6/lib/action_view/helpers/tags/search_field.rb
actionpack-4.0.10 lib/action_view/helpers/tags/search_field.rb
actionview-4.1.6 lib/action_view/helpers/tags/search_field.rb