title: haml assign value to input field
body: <p>I'm trying to insert a value inside an input field, when the field of controller is not empty.</p>
  
  <pre><code>%input{:name =&gt; "user[email]", :placeholder =&gt; "Email", :type =&gt; "email", :value =&gt; @params[:user][:email] if @params[:user] &amp;&amp; @params[:user][:email]}/
  </code></pre>
  
  <p>That is what I'm trying to do, but obviously I'm getting an error:</p>
  
  <pre><code>syntax error, unexpected modifier_if, expecting ')'
  e =&gt; @params[:user][:email] if @params[:user] &amp;&amp; @params[:us
                   ^
  /xxx/xxx/xxx syntax error, 
  unexpected ')', expecting keyword_end
  @params[:user][:email])).to_s);; _hamlout.buffer &lt;&lt; ("&gt;\n&lt;in
                    ^
  </code></pre>
  
  <p>What should I modify to get that working ?</p>
  
  <p>Thanks in advance :)</p>