0
I have a code that in my backend it returns true or false, I am working with ruby and Rails 5.
then I have la an if more or less so ja:
<% if @order? %>
<h2> teste 2 <h2>
<%else>
<h1>teste 1</h1>
<%end>
however what I want to do is the following if it is true in the backend check if the frontend is also true and add the result true or false inside that if no . erb
something like that:
<% if @order? && var ou algo que retornar true no lado do client %>
<h2> teste 2 <h2>
<%else>
<h1>teste 1</h1>
<%end>
If you have any other idea how to do that, we’d appreciate it.