Module: IJSRails::ActionViewHelpers
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/ijs-rails/action_view_helpers.rb
Overview
Helper methods to include into action view.
Instance Method Summary collapse
-
#render_ijs(script, options = {}) ⇒ String
Render an HTML <script> tag containing the compiled script.
Instance Method Details
#render_ijs(script, options = {}) ⇒ String
Render an HTML <script> tag containing the compiled script.
15 16 17 18 19 20 21 22 |
# File 'lib/ijs-rails/action_view_helpers.rb', line 15 def render_ijs(script, = {}) = .dup = .slice!(:async, :defer, :nonce, :type) javascript_tag() do IJSRails::Script.new(script, ).compiled.html_safe end end |