in my user_helper.rb
“window.location = window.location.href +
in my new.html.haml view
first pass (correct)
subsequent pass ( incorrect … but normal as per the js code)
how should I modify the js code to avoid repetition of the anchor, in
Ruby I would write that …
"… unless window.location.href already contains ‘#register_form’ "
" … window.location = window.location.href + ‘#register_form’ "
" … end
but in .js is there any equivalent ?
thanks for your feedback