Skip to content

Commit

Permalink
Dropped options hash in favour of keyword argument for async.
Browse files Browse the repository at this point in the history
  • Loading branch information
accuser committed Feb 15, 2016
1 parent edf058c commit 763c168
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/hanami/assets/helpers.rb
Expand Up @@ -131,11 +131,9 @@ def self.included(base)
# <%= javascript 'application' %>
#
# # <script src="https://assets.bookshelf.org/assets/application-28a6b886de2372ee3922fcaf3f78f2d8.js" type="text/javascript"></script>
def javascript(*sources, **options)
options[:async] ||= false

def javascript(*sources, async: false)
_safe_tags(*sources) do |source|
html.script(src: _typed_asset_path(source, JAVASCRIPT_EXT), type: JAVASCRIPT_MIME_TYPE, async: options[:async]).to_s
html.script(src: _typed_asset_path(source, JAVASCRIPT_EXT), type: JAVASCRIPT_MIME_TYPE, async: async).to_s
end
end

Expand Down

0 comments on commit 763c168

Please sign in to comment.