aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_view/helpers')
-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.rb4
-rw-r--r--actionpack/lib/action_view/helpers/form_tag_helper.rb20
-rw-r--r--actionpack/lib/action_view/helpers/javascript_helper.rb6
-rw-r--r--actionpack/lib/action_view/helpers/url_helper.rb8
6 files changed, 30 insertions, 13 deletions
diff --git a/actionpack/lib/action_view/helpers/date_helper.rb b/actionpack/lib/action_view/helpers/date_helper.rb
index 77d8794b7d..459f95bb73 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 b87c2e936f..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
- ActiveSupport::Deprecation.warn(
- "Giving a block to FormBuilder is deprecated and has no effect anymore.")
+ 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 a33b233ed5..b7b3db959e 100644
--- a/actionpack/lib/action_view/helpers/form_options_helper.rb
+++ b/actionpack/lib/action_view/helpers/form_options_helper.rb
@@ -519,7 +519,9 @@ module ActionView
else
prompt = options
options = {}
- ActiveSupport::Deprecation.warn "Passing the prompt to grouped_options_for_select as an argument is deprecated. Please use an options hash like `{ prompt: #{prompt.inspect} }`."
+ 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
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 0257a13bc4..7f42d6e9c3 100644
--- a/actionpack/lib/action_view/helpers/form_tag_helper.rb
+++ b/actionpack/lib/action_view/helpers/form_tag_helper.rb
@@ -425,13 +425,17 @@ module ActionView
options = options.stringify_keys
if disable_with = options.delete("disable_with")
- ActiveSupport::Deprecation.warn ":disable_with option is deprecated and will be removed from Rails 4.1. Use ':data => { :disable_with => \'Text\' }' instead"
+ message = ":disable_with option is deprecated and will be removed from Rails 4.1. " \
+ "Use 'data: { disable_with: \'Text\' }' instead."
+ ActiveSupport::Deprecation.warn message
options["data-disable-with"] = disable_with
end
if confirm = options.delete("confirm")
- ActiveSupport::Deprecation.warn ":confirm option is deprecated and will be removed from Rails 4.1. Use ':data => { :confirm => \'Text\' }' instead'"
+ message = ":confirm option is deprecated and will be removed from Rails 4.1. " \
+ "Use 'data: { confirm: \'Text\' }' instead'."
+ ActiveSupport::Deprecation.warn message
options["data-confirm"] = confirm
end
@@ -483,13 +487,17 @@ module ActionView
options = options.stringify_keys
if disable_with = options.delete("disable_with")
- ActiveSupport::Deprecation.warn ":disable_with option is deprecated and will be removed from Rails 4.1. Use ':data => { :disable_with => \'Text\' }' instead"
+ message = ":disable_with option is deprecated and will be removed from Rails 4.1. " \
+ "Use 'data: { disable_with: \'Text\' }' instead."
+ ActiveSupport::Deprecation.warn message
options["data-disable-with"] = disable_with
end
if confirm = options.delete("confirm")
- ActiveSupport::Deprecation.warn ":confirm option is deprecated and will be removed from Rails 4.1. Use ':data => { :confirm => \'Text\' }' instead'"
+ message = ":confirm option is deprecated and will be removed from Rails 4.1. " \
+ "Use 'data: { confirm: \'Text\' }' instead'."
+ ActiveSupport::Deprecation.warn message
options["data-confirm"] = confirm
end
@@ -533,7 +541,9 @@ module ActionView
options = options.stringify_keys
if confirm = options.delete("confirm")
- ActiveSupport::Deprecation.warn ":confirm option is deprecated and will be removed from Rails 4.1. Use ':data => { :confirm => \'Text\' }' instead'"
+ message = ":confirm option is deprecated and will be removed from Rails 4.1. " \
+ "Use 'data: { confirm: \'Text\' }' instead'."
+ 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 a30326349a..1a99fc7091 100644
--- a/actionpack/lib/action_view/helpers/javascript_helper.rb
+++ b/actionpack/lib/action_view/helpers/javascript_helper.rb
@@ -78,7 +78,8 @@ module ActionView
# # => <input class="ok" onclick="alert('Hello world!');" type="button" value="Greeting" />
#
def button_to_function(name, function=nil, html_options={})
- message = "button_to_function is deprecated and will be removed from Rails 4.1. Use Unobtrusive JavaScript instead."
+ 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
onclick = "#{"#{html_options[:onclick]}; " if html_options[:onclick]}#{function};"
@@ -99,7 +100,8 @@ module ActionView
# # => <a class="nav_link" href="#" onclick="alert('Hello world!'); return false;">Greeting</a>
#
def link_to_function(name, function, html_options={})
- message = "link_to_function is deprecated and will be removed from Rails 4.1. Use Unobtrusive JavaScript instead."
+ 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
onclick = "#{"#{html_options[:onclick]}; " if html_options[:onclick]}#{function}; return false;"
diff --git a/actionpack/lib/action_view/helpers/url_helper.rb b/actionpack/lib/action_view/helpers/url_helper.rb
index 9bfda0ee9c..fd671c9c07 100644
--- a/actionpack/lib/action_view/helpers/url_helper.rb
+++ b/actionpack/lib/action_view/helpers/url_helper.rb
@@ -577,7 +577,9 @@ module ActionView
method = html_options.delete('method')
if confirm
- ActiveSupport::Deprecation.warn ":confirm option is deprecated and will be removed from Rails 4.1. Use ':data => { :confirm => \'Text\' }' instead"
+ message = ":confirm option is deprecated and will be removed from Rails 4.1. " \
+ "Use 'data: { confirm: \'Text\' }' instead."
+ ActiveSupport::Deprecation.warn message
html_options["data-confirm"] = confirm
end
@@ -585,7 +587,9 @@ module ActionView
add_method_to_attributes!(html_options, method) if method
if disable_with
- ActiveSupport::Deprecation.warn ":disable_with option is deprecated and will be removed from Rails 4.1. Use ':data => { :disable_with => \'Text\' }' instead"
+ message = ":disable_with option is deprecated and will be removed from Rails 4.1. " \
+ "Use 'data: { disable_with: \'Text\' }' instead."
+ ActiveSupport::Deprecation.warn message
html_options["data-disable-with"] = disable_with
end