Created
July 14, 2010 04:51
-
-
Save chrisdarroch/475042 to your computer and use it in GitHub Desktop.
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
<html> | |
<body> | |
<div id="wrapper"> | |
<%# Huzzah! I can render messages way outside the bounds of my content structure! %> | |
<div id="messages"> | |
<%= yield :messages %> | |
</div> | |
<section id="main"> | |
<nav class="sidebar"> | |
... | |
</nav> | |
<section id="content"> | |
<%= yield %> | |
</section> | |
</section> | |
</div> | |
</body> | |
</html> |
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
<%= form_for @person do |form| %> | |
<%= render :partial => "form", :locals => { :form => form } %> | |
<%- end %> |
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
<% content_for :messages do %> | |
<!-- Aha! I'm a form-specific piece of information and I *refuse* to be contained by your form, nor your rigid markup structure! --> | |
<%= form.error_messages %> | |
<%- end %> | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment