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.16 lib/action_view/helpers/tags/search_field.rb
actionview-4.1.16.rc1 lib/action_view/helpers/tags/search_field.rb
actionview-4.1.15 lib/action_view/helpers/tags/search_field.rb
actionview-4.1.15.rc1 lib/action_view/helpers/tags/search_field.rb
actionview-4.1.14.2 lib/action_view/helpers/tags/search_field.rb
actionview-4.1.14.1 lib/action_view/helpers/tags/search_field.rb
angular-rails4-templates-0.4.1 vendor/ruby/2.1.0/gems/actionview-4.1.13/lib/action_view/helpers/tags/search_field.rb
angular-rails4-templates-0.4.0 vendor/ruby/2.1.0/gems/actionview-4.1.13/lib/action_view/helpers/tags/search_field.rb
angular-rails4-templates-0.3.0 vendor/ruby/2.1.0/gems/actionview-4.1.13/lib/action_view/helpers/tags/search_field.rb
actionview-4.1.14 lib/action_view/helpers/tags/search_field.rb
actionview-4.1.14.rc2 lib/action_view/helpers/tags/search_field.rb
actionview-4.1.14.rc1 lib/action_view/helpers/tags/search_field.rb
actionview-4.1.13 lib/action_view/helpers/tags/search_field.rb
actionview-4.1.13.rc1 lib/action_view/helpers/tags/search_field.rb
actionview-4.1.12 lib/action_view/helpers/tags/search_field.rb
actionview-4.1.12.rc1 lib/action_view/helpers/tags/search_field.rb
actionview-4.1.11 lib/action_view/helpers/tags/search_field.rb
actionview-4.1.10 lib/action_view/helpers/tags/search_field.rb
actionview-4.1.10.rc4 lib/action_view/helpers/tags/search_field.rb
actionview-4.1.10.rc3 lib/action_view/helpers/tags/search_field.rb