Created
March 1, 2012 06:22
-
-
Save johncblandii/1947754 to your computer and use it in GitHub Desktop.
form_for failing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This fails to output the <form>. | |
<div> | |
<h2>Sign Up</h2> Already a user? <%= link_to "Sign In Here", signin_path %> | |
</div | |
<%= form_for @u do |f| %> | |
...form fields here... | |
<% end %> | |
Output: | |
<div> | |
<h2 class="inline">Sign Up</h2> <span>Already a user? <a href="/signin">Sign In Here</a> </span> | |
</div> | |
<form accept-charset="UTF-8" action="/users" class="new_user" id="new_user" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="✓" /><input name="authenticity_token" type="hidden" value="pgvjDAIdhoxOvd06xgzRS77HBo1rq0sCXYIOm2vgo84=" /></div> | |
... | |
</form> | |
----- | |
This works just fine: | |
<h2 class="inline">Sign Up</h2> <span>Already a user? <%= link_to "Sign In Here", signin_path %> </span> | |
<%= form_for @u do |f| %> | |
... | |
<% end %> | |
Output: | |
<h2 class="inline">Sign Up</h2> <span>Already a user? <a href="/signin">Sign In Here</a> </span> | |
<form accept-charset="UTF-8" action="/users" class="new_user" id="new_user" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="✓" /><input name="authenticity_token" type="hidden" value="pgvjDAIdhoxOvd06xgzRS77HBo1rq0sCXYIOm2vgo84=" /></div> | |
... | |
</form> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment