diff options
author | José Valim <jose.valim@gmail.com> | 2010-09-27 21:00:54 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-09-27 21:00:54 +0200 |
commit | fe0251e408a8b5d1ee149c7cad7bcfc495ce1595 (patch) | |
tree | 620f92c8485809ded3cd4081966d147efc8ad806 /actionpack/lib/action_view | |
parent | 6067d1620075c1c311bbae01993453cd80967804 (diff) | |
parent | 50decfbc0e2e58961cc3665710922860d38ee2fb (diff) | |
download | rails-fe0251e408a8b5d1ee149c7cad7bcfc495ce1595.tar.gz rails-fe0251e408a8b5d1ee149c7cad7bcfc495ce1595.tar.bz2 rails-fe0251e408a8b5d1ee149c7cad7bcfc495ce1595.zip |
Merge remote branch 'miloops/warnings'
Conflicts:
actionpack/lib/action_controller/metal/url_for.rb
Diffstat (limited to 'actionpack/lib/action_view')
-rw-r--r-- | actionpack/lib/action_view/helpers/date_helper.rb | 1 | ||||
-rw-r--r-- | actionpack/lib/action_view/helpers/form_helper.rb | 2 | ||||
-rw-r--r-- | actionpack/lib/action_view/test_case.rb | 1 | ||||
-rw-r--r-- | actionpack/lib/action_view/testing/resolvers.rb | 8 |
4 files changed, 7 insertions, 5 deletions
diff --git a/actionpack/lib/action_view/helpers/date_helper.rb b/actionpack/lib/action_view/helpers/date_helper.rb index 9891478606..3aee4fb773 100644 --- a/actionpack/lib/action_view/helpers/date_helper.rb +++ b/actionpack/lib/action_view/helpers/date_helper.rb @@ -923,6 +923,7 @@ module ActionView private def datetime_selector(options, html_options) datetime = value(object) || default_datetime(options) + @auto_index ||= nil options = options.dup options[:field_name] = @method_name diff --git a/actionpack/lib/action_view/helpers/form_helper.rb b/actionpack/lib/action_view/helpers/form_helper.rb index 3ebc6601e5..8bae6d2796 100644 --- a/actionpack/lib/action_view/helpers/form_helper.rb +++ b/actionpack/lib/action_view/helpers/form_helper.rb @@ -1237,7 +1237,7 @@ module ActionView end def emitted_hidden_id? - @emitted_hidden_id + @emitted_hidden_id ||= nil end private diff --git a/actionpack/lib/action_view/test_case.rb b/actionpack/lib/action_view/test_case.rb index ff35fb7df4..32fd8c5e21 100644 --- a/actionpack/lib/action_view/test_case.rb +++ b/actionpack/lib/action_view/test_case.rb @@ -127,6 +127,7 @@ module ActionView def say_no_to_protect_against_forgery! _helpers.module_eval do + remove_method :protect_against_forgery? if method_defined?(:protect_against_forgery?) def protect_against_forgery? false end diff --git a/actionpack/lib/action_view/testing/resolvers.rb b/actionpack/lib/action_view/testing/resolvers.rb index 97de2471cf..b2b62528a9 100644 --- a/actionpack/lib/action_view/testing/resolvers.rb +++ b/actionpack/lib/action_view/testing/resolvers.rb @@ -22,10 +22,10 @@ module ActionView #:nodoc: end templates = [] - @hash.select { |k,v| k =~ /^#{query}$/ }.each do |path, source| - handler, format = extract_handler_and_format(path, formats) - templates << Template.new(source, path, handler, - :virtual_path => path, :format => format) + @hash.select { |k,v| k =~ /^#{query}$/ }.each do |_path, source| + handler, format = extract_handler_and_format(_path, formats) + templates << Template.new(source, _path, handler, + :virtual_path => _path, :format => format) end templates.sort_by {|t| -t.identifier.match(/^#{query}$/).captures.reject(&:blank?).size } |