diff options
author | kennyj <kennyj@gmail.com> | 2013-06-02 00:39:11 +0900 |
---|---|---|
committer | kennyj <kennyj@gmail.com> | 2013-06-02 00:39:11 +0900 |
commit | bc5314a10231983c46ab81488935b259cdf36a04 (patch) | |
tree | 498556fc54e2f5840809e002859f51ca92376630 /actionpack/lib | |
parent | 74f2b41ce06492da307c7f00b011a8c5106e1151 (diff) | |
download | rails-bc5314a10231983c46ab81488935b259cdf36a04.tar.gz rails-bc5314a10231983c46ab81488935b259cdf36a04.tar.bz2 rails-bc5314a10231983c46ab81488935b259cdf36a04.zip |
Raise ArgumentError to fix Rails 4.1 deprecation warn message.
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_view/helpers/asset_tag_helper.rb | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/actionpack/lib/action_view/helpers/asset_tag_helper.rb b/actionpack/lib/action_view/helpers/asset_tag_helper.rb index 3a6f449eb8..2b3a3c6a29 100644 --- a/actionpack/lib/action_view/helpers/asset_tag_helper.rb +++ b/actionpack/lib/action_view/helpers/asset_tag_helper.rb @@ -127,11 +127,7 @@ module ActionView # # => <link rel="alternate" type="application/rss+xml" title="Example RSS" href="http://www.example.com/feed" /> def auto_discovery_link_tag(type = :rss, url_options = {}, tag_options = {}) if !(type == :rss || type == :atom) && tag_options[:type].blank? - message = "You have passed type other than :rss or :atom to auto_discovery_link_tag and haven't supplied " + - "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 + raise ArgumentError.new("You should pass :type tag_option key explicitly, because you have passed #{type} type other than :rss or :atom.") end tag( |