I have a code that on my backend it returns true or false, I'm working with ruby and rails 5.
So I have it's an if or so ja:
<% if @order? %>
<h2> teste 2 <h2>
<%else>
<h1>teste 1</h1>
<%end>
But what I want to do is the following if it is true in the backend check if the frontend is too and add the result true or false inside that if in .erb
something like this:
<% 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 ideas on how to do this, you will be very welcome.