Module: Capybara::Lockstep::Helper
- Defined in:
- lib/capybara-lockstep/helper.rb
Constant Summary collapse
- JS_PATH =
File.('../helper.js', __FILE__)
- HELPER_JS =
IO.read(JS_PATH)
Instance Method Summary collapse
Instance Method Details
#capybara_lockstep(options = {}) ⇒ Object
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/capybara-lockstep/helper.rb', line 12 def ( = {}) = {} # Add a CSRF nonce if supported by our Rails version if Rails.version >= '5' [:nonce] = .fetch(:nonce, true) end javascript_tag((), ) end |
#capybara_lockstep_js(options = {}) ⇒ Object
8 9 10 |
# File 'lib/capybara-lockstep/helper.rb', line 8 def ( = {}) HELPER_JS + () end |