aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view
diff options
context:
space:
mode:
authorAlexey Gaziev <alex.gaziev@gmail.com>2012-10-30 10:23:41 +0800
committerAlexey Gaziev <alex.gaziev@gmail.com>2012-10-30 10:23:41 +0800
commitb955939d55b71905fa3e5036149ee4c84943c599 (patch)
treefaceebca94859de69e12f4d7b48e9958b1631575 /actionpack/lib/action_view
parent4e23c0ef341c2cba6a4b21022d4ffbabdaa6e3da (diff)
downloadrails-b955939d55b71905fa3e5036149ee4c84943c599.tar.gz
rails-b955939d55b71905fa3e5036149ee4c84943c599.tar.bz2
rails-b955939d55b71905fa3e5036149ee4c84943c599.zip
Make caller attribute in deprecation methods optional
Diffstat (limited to 'actionpack/lib/action_view')
-rw-r--r--actionpack/lib/action_view/helpers/asset_tag_helper.rb2
-rw-r--r--actionpack/lib/action_view/helpers/date_helper.rb2
-rw-r--r--actionpack/lib/action_view/helpers/form_helper.rb3
-rw-r--r--actionpack/lib/action_view/helpers/form_options_helper.rb2
-rw-r--r--actionpack/lib/action_view/helpers/form_tag_helper.rb10
-rw-r--r--actionpack/lib/action_view/helpers/javascript_helper.rb4
-rw-r--r--actionpack/lib/action_view/helpers/url_helper.rb4
-rw-r--r--actionpack/lib/action_view/template.rb2
-rw-r--r--actionpack/lib/action_view/template/resolver.rb2
9 files changed, 15 insertions, 16 deletions
diff --git a/actionpack/lib/action_view/helpers/asset_tag_helper.rb b/actionpack/lib/action_view/helpers/asset_tag_helper.rb
index 9a2b5ae16a..4eac6514df 100644
--- a/actionpack/lib/action_view/helpers/asset_tag_helper.rb
+++ b/actionpack/lib/action_view/helpers/asset_tag_helper.rb
@@ -125,7 +125,7 @@ module ActionView
"the :type option key. This behavior is deprecated and will be remove in Rails 4.1. You should pass " +
":type option explicitly if you want to use other types, for example: " +
"auto_discovery_link_tag(:xml, '/feed.xml', :type => 'application/xml')"
- ActiveSupport::Deprecation.warn(message, caller)
+ ActiveSupport::Deprecation.warn message
end
tag(
diff --git a/actionpack/lib/action_view/helpers/date_helper.rb b/actionpack/lib/action_view/helpers/date_helper.rb
index f43d20c6ed..61e39afd8e 100644
--- a/actionpack/lib/action_view/helpers/date_helper.rb
+++ b/actionpack/lib/action_view/helpers/date_helper.rb
@@ -69,7 +69,7 @@ module ActionView
options = include_seconds_or_options
else
ActiveSupport::Deprecation.warn "distance_of_time_in_words and time_ago_in_words now accept :include_seconds " +
- "as a part of options hash, not a boolean argument", caller
+ "as a part of options hash, not a boolean argument"
options[:include_seconds] ||= !!include_seconds_or_options
end
diff --git a/actionpack/lib/action_view/helpers/form_helper.rb b/actionpack/lib/action_view/helpers/form_helper.rb
index 1a0ce29756..6abf1e1751 100644
--- a/actionpack/lib/action_view/helpers/form_helper.rb
+++ b/actionpack/lib/action_view/helpers/form_helper.rb
@@ -1181,8 +1181,7 @@ module ActionView
def initialize(object_name, object, template, options, block=nil)
if block
- message = "Giving a block to FormBuilder is deprecated and has no effect anymore."
- ActiveSupport::Deprecation.warn(message, caller)
+ ActiveSupport::Deprecation.warn "Giving a block to FormBuilder is deprecated and has no effect anymore."
end
@nested_child_index = {}
diff --git a/actionpack/lib/action_view/helpers/form_options_helper.rb b/actionpack/lib/action_view/helpers/form_options_helper.rb
index dec87013d3..87f4380baf 100644
--- a/actionpack/lib/action_view/helpers/form_options_helper.rb
+++ b/actionpack/lib/action_view/helpers/form_options_helper.rb
@@ -521,7 +521,7 @@ module ActionView
options = {}
message = "Passing the prompt to grouped_options_for_select as an argument is deprecated. " \
"Please use an options hash like `{ prompt: #{prompt.inspect} }`."
- ActiveSupport::Deprecation.warn(message, caller)
+ ActiveSupport::Deprecation.warn message
end
body = "".html_safe
diff --git a/actionpack/lib/action_view/helpers/form_tag_helper.rb b/actionpack/lib/action_view/helpers/form_tag_helper.rb
index 11bc0cbec8..7680208702 100644
--- a/actionpack/lib/action_view/helpers/form_tag_helper.rb
+++ b/actionpack/lib/action_view/helpers/form_tag_helper.rb
@@ -427,7 +427,7 @@ module ActionView
if disable_with = options.delete("disable_with")
message = ":disable_with option is deprecated and will be removed from Rails 4.1. " \
"Use 'data: { disable_with: \'Text\' }' instead."
- ActiveSupport::Deprecation.warn(message, caller)
+ ActiveSupport::Deprecation.warn message
options["data-disable-with"] = disable_with
end
@@ -435,7 +435,7 @@ module ActionView
if confirm = options.delete("confirm")
message = ":confirm option is deprecated and will be removed from Rails 4.1. " \
"Use 'data: { confirm: \'Text\' }' instead'."
- ActiveSupport::Deprecation.warn(message, caller)
+ ActiveSupport::Deprecation.warn message
options["data-confirm"] = confirm
end
@@ -489,7 +489,7 @@ module ActionView
if disable_with = options.delete("disable_with")
message = ":disable_with option is deprecated and will be removed from Rails 4.1. " \
"Use 'data: { disable_with: \'Text\' }' instead."
- ActiveSupport::Deprecation.warn(message, caller)
+ ActiveSupport::Deprecation.warn message
options["data-disable-with"] = disable_with
end
@@ -497,7 +497,7 @@ module ActionView
if confirm = options.delete("confirm")
message = ":confirm option is deprecated and will be removed from Rails 4.1. " \
"Use 'data: { confirm: \'Text\' }' instead'."
- ActiveSupport::Deprecation.warn(message, caller)
+ ActiveSupport::Deprecation.warn message
options["data-confirm"] = confirm
end
@@ -543,7 +543,7 @@ module ActionView
if confirm = options.delete("confirm")
message = ":confirm option is deprecated and will be removed from Rails 4.1. " \
"Use 'data: { confirm: \'Text\' }' instead'."
- ActiveSupport::Deprecation.warn(message, caller)
+ ActiveSupport::Deprecation.warn message
options["data-confirm"] = confirm
end
diff --git a/actionpack/lib/action_view/helpers/javascript_helper.rb b/actionpack/lib/action_view/helpers/javascript_helper.rb
index 6be35168dd..7bf659d5f2 100644
--- a/actionpack/lib/action_view/helpers/javascript_helper.rb
+++ b/actionpack/lib/action_view/helpers/javascript_helper.rb
@@ -80,7 +80,7 @@ module ActionView
def button_to_function(name, function=nil, html_options={})
message = "button_to_function is deprecated and will be removed from Rails 4.1. We recomend to use Unobtrusive JavaScript instead. " +
"See http://guides.rubyonrails.org/working_with_javascript_in_rails.html#unobtrusive-javascript"
- ActiveSupport::Deprecation.warn(message, caller)
+ ActiveSupport::Deprecation.warn message
onclick = "#{"#{html_options[:onclick]}; " if html_options[:onclick]}#{function};"
@@ -102,7 +102,7 @@ module ActionView
def link_to_function(name, function, html_options={})
message = "link_to_function is deprecated and will be removed from Rails 4.1. We recomend to use Unobtrusive JavaScript instead. " +
"See http://guides.rubyonrails.org/working_with_javascript_in_rails.html#unobtrusive-javascript"
- ActiveSupport::Deprecation.warn(message, caller)
+ ActiveSupport::Deprecation.warn message
onclick = "#{"#{html_options[:onclick]}; " if html_options[:onclick]}#{function}; return false;"
href = html_options[:href] || '#'
diff --git a/actionpack/lib/action_view/helpers/url_helper.rb b/actionpack/lib/action_view/helpers/url_helper.rb
index 2a1dd86e0a..48ac4312b6 100644
--- a/actionpack/lib/action_view/helpers/url_helper.rb
+++ b/actionpack/lib/action_view/helpers/url_helper.rb
@@ -579,7 +579,7 @@ module ActionView
if confirm
message = ":confirm option is deprecated and will be removed from Rails 4.1. " \
"Use 'data: { confirm: \'Text\' }' instead."
- ActiveSupport::Deprecation.warn(message, caller)
+ ActiveSupport::Deprecation.warn message
html_options["data-confirm"] = confirm
end
@@ -589,7 +589,7 @@ module ActionView
if disable_with
message = ":disable_with option is deprecated and will be removed from Rails 4.1. " \
"Use 'data: { disable_with: \'Text\' }' instead."
- ActiveSupport::Deprecation.warn(message, caller)
+ ActiveSupport::Deprecation.warn message
html_options["data-disable-with"] = disable_with
end
diff --git a/actionpack/lib/action_view/template.rb b/actionpack/lib/action_view/template.rb
index 01a6bb42c8..aefc42be48 100644
--- a/actionpack/lib/action_view/template.rb
+++ b/actionpack/lib/action_view/template.rb
@@ -150,7 +150,7 @@ module ActionView
def mime_type
message = 'Template#mime_type is deprecated and will be removed in Rails 4.1. Please use type method instead.'
- ActiveSupport::Deprecation.warn(message, caller)
+ ActiveSupport::Deprecation.warn message
@mime_type ||= Mime::Type.lookup_by_extension(@formats.first.to_s) if @formats.first
end
diff --git a/actionpack/lib/action_view/template/resolver.rb b/actionpack/lib/action_view/template/resolver.rb
index 086cc0bacc..fc77c1485d 100644
--- a/actionpack/lib/action_view/template/resolver.rb
+++ b/actionpack/lib/action_view/template/resolver.rb
@@ -237,7 +237,7 @@ module ActionView
unless extension
message = "The file #{path} did not specify a template handler. The default is currently ERB, " \
"but will change to RAW in the future."
- ActiveSupport::Deprecation.warn(message, caller)
+ ActiveSupport::Deprecation.warn message
end
handler = Template.handler_for_extension(extension)