Skip to content

Commit

Permalink
map arguments directly in stylesheet and javascript includes instead …
Browse files Browse the repository at this point in the history
…of converting to a string - closes ryanb#14
  • Loading branch information
ryanb committed Aug 14, 2009
1 parent 5d34be0 commit 8aed0bc
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions rails_generators/nifty_layout/templates/helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,10 @@ def show_title?
end

def stylesheet(*args)
content_for(:head) { stylesheet_link_tag(*args.map(&:to_s)) }
content_for(:head) { stylesheet_link_tag(*args) }
end

def javascript(*args)
args = args.map { |arg| arg == :defaults ? arg : arg.to_s }
content_for(:head) { javascript_include_tag(*args) }
end
end

0 comments on commit 8aed0bc

Please sign in to comment.