Guest User

Untitled

a guest
Jul 17th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. def javascript(print_tag = false, &block)
  2. content_for(:javascript) do
  3. if print_tag
  4. js = Proc.new { block.call }
  5. javascript_tag(&js)
  6. else
  7. capture(&block)
  8. end
  9. end
  10. end
Add Comment
Please, Sign In to add comment