I’ve written the following ERB and am getting a syntax error at the question mark. This helper function from devise currently evaluates as false. What have I missed?
<%= if user_signed_in? %>
<%= render 'form' %>
<%= end %>
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Try this :
If you do <%= … %>, it will try to output the thing you put between the tags. But, if you do <% … %>, then no output is processed, just the code is evaluated. If this is not working, then there is probably something wrong with your user_signed_in? helper method.