creating alias to javascript_script_tag

This commit is contained in:
Lucas Souza 2011-06-20 10:50:22 -03:00
parent 9e7eea0fc2
commit 910e8fd314
1 changed files with 2 additions and 4 deletions

View File

@ -23,15 +23,13 @@ module Sinatra
list.collect { |source| stylesheet_tag(source, options) }.join("\n") list.collect { |source| stylesheet_tag(source, options) }.join("\n")
end end
def javascript_include_tag(*sources)
javascript_script_tag *sources
end
def javascript_script_tag(*sources) def javascript_script_tag(*sources)
list, options = extract_options(sources) list, options = extract_options(sources)
list.collect { |source| javascript_tag(source, options) }.join("\n") list.collect { |source| javascript_tag(source, options) }.join("\n")
end end
alias :javascript_include_tag, :javascript_script_tag
def link_to(desc, url, options = {}) def link_to(desc, url, options = {})
tag("a", options.merge(:href => url_for(url))) do tag("a", options.merge(:href => url_for(url))) do
desc desc