提交 a5976ccc 编写于 作者: L Lucas Caton

Remove slash from favicon_link_tag method attribute

上级 40c287c7
...@@ -26,6 +26,8 @@ ...@@ -26,6 +26,8 @@
This is a behavior change, previously the hidden tag had a value of the disabled checkbox. This is a behavior change, previously the hidden tag had a value of the disabled checkbox.
*Tadas Tamosauskas* *Tadas Tamosauskas*
* `favicon_link_tag` helper will now use the favicon in app/assets by default. *Lucas Caton*
## Rails 3.2.0 (January 20, 2012) ## ## Rails 3.2.0 (January 20, 2012) ##
* Add `config.action_dispatch.default_charset` to configure default charset for ActionDispatch::Response. *Carlos Antonio da Silva* * Add `config.action_dispatch.default_charset` to configure default charset for ActionDispatch::Response. *Carlos Antonio da Silva*
......
...@@ -234,7 +234,7 @@ def auto_discovery_link_tag(type = :rss, url_options = {}, tag_options = {}) ...@@ -234,7 +234,7 @@ def auto_discovery_link_tag(type = :rss, url_options = {}, tag_options = {})
# #
# generates # generates
# #
# <link href="/favicon.ico" rel="shortcut icon" type="image/vnd.microsoft.icon" /> # <link href="/assets/favicon.ico" rel="shortcut icon" type="image/vnd.microsoft.icon" />
# #
# You may specify a different file in the first argument: # You may specify a different file in the first argument:
# #
...@@ -252,7 +252,7 @@ def auto_discovery_link_tag(type = :rss, url_options = {}, tag_options = {}) ...@@ -252,7 +252,7 @@ def auto_discovery_link_tag(type = :rss, url_options = {}, tag_options = {})
# #
# <%= favicon_link_tag 'mb-icon.png', :rel => 'apple-touch-icon', :type => 'image/png' %> # <%= favicon_link_tag 'mb-icon.png', :rel => 'apple-touch-icon', :type => 'image/png' %>
# #
def favicon_link_tag(source='/favicon.ico', options={}) def favicon_link_tag(source='favicon.ico', options={})
tag('link', { tag('link', {
:rel => 'shortcut icon', :rel => 'shortcut icon',
:type => 'image/vnd.microsoft.icon', :type => 'image/vnd.microsoft.icon',
......
...@@ -168,7 +168,7 @@ def teardown ...@@ -168,7 +168,7 @@ def teardown
} }
FaviconLinkToTag = { FaviconLinkToTag = {
%(favicon_link_tag) => %(<link href="/favicon.ico" rel="shortcut icon" type="image/vnd.microsoft.icon" />), %(favicon_link_tag) => %(<link href="/images/favicon.ico" rel="shortcut icon" type="image/vnd.microsoft.icon" />),
%(favicon_link_tag 'favicon.ico') => %(<link href="/images/favicon.ico" rel="shortcut icon" type="image/vnd.microsoft.icon" />), %(favicon_link_tag 'favicon.ico') => %(<link href="/images/favicon.ico" rel="shortcut icon" type="image/vnd.microsoft.icon" />),
%(favicon_link_tag 'favicon.ico', :rel => 'foo') => %(<link href="/images/favicon.ico" rel="foo" type="image/vnd.microsoft.icon" />), %(favicon_link_tag 'favicon.ico', :rel => 'foo') => %(<link href="/images/favicon.ico" rel="foo" type="image/vnd.microsoft.icon" />),
%(favicon_link_tag 'favicon.ico', :rel => 'foo', :type => 'bar') => %(<link href="/images/favicon.ico" rel="foo" type="bar" />), %(favicon_link_tag 'favicon.ico', :rel => 'foo', :type => 'bar') => %(<link href="/images/favicon.ico" rel="foo" type="bar" />),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册