Note that there are some explanatory texts on larger screens.

plurals
  1. POrails, slim and form_tag does not allow more then one on a page
    primarykey
    data
    text
    <p>I am using slim templates for my rails application. But something strang is happening. In my application template I have a form like so:</p> <pre><code>= form_tag search_path, class:'navbar-search pull-left', remote: true = text_field_tag :term, nil, class: 'search-query span2', placeholder: 'Search' </code></pre> <p>That renders well on my page and the search form is working fine. However in my sign up partial I have:</p> <pre><code>= form_tag '/auth/identity/callback' - if @identity &amp;&amp; @identity.errors.any? div.error h2 =pluralize(@identity.errors.count, 'error') |prohibited this account from being saved: ul - @identity.errors.full_messages.each do |msg| li =msg h1 i.iconbig-lock | Sign In div.login-fields p Sign In using your email: div.field = label_tag :auth_key, 'Email' = text_field_tag :auth_key, nil, class: 'input login username-field', placeholder: 'Email' div.field = label_tag :password, 'Password' = password_field_tag :password, nil, class:'login password-field', placeholder: 'password' div.login-actions = submit_tag 'Login', class: 'btn-signin btn btn-primary' div.login-social.marg10-btm p Sign in using social network: a.btn = image_tag 'twitter-18.png' | Signin with twitter a.btn href="/auth/facebook" = image_tag 'facebook-18.png' | Signin with Facebook </code></pre> <p>the form tag doesn't render, but all sub elements text fields (including the 'authenticity_token') renders fine.</p> <p>I play around abit and notice that the page only allow 1 form_tag. Ones created after the first never renders. I been looking on google for a while and could not figure why. Any ideas? </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload