RJS templates are a bit misleading. They are produced server side and
don’t have access to the state of the client side. So you can’t test
on the value of something on the page in the RJS template itself.
You can render a JS conditional, or you can pass the value you are
interested in as a parameter to the call that invokes the RJS action.
RJS templates are a bit misleading. They are produced server side and
don’t have access to the state of the client side. So you can’t test
on the value of something on the page in the RJS template itself.
You can render a JS conditional, or you can pass the value you are
interested in as a parameter to the call that invokes the RJS action.