Created
          September 8, 2012 19:02 
        
      - 
      
 - 
        
Save lucasrenan/3678692 to your computer and use it in GitHub Desktop.  
    form rails girls
  
        
  
    
      This file contains hidden or 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(@post, :html => {:multipart => true}) do |f| %> | |
| <% if @post.errors.any? %> | |
| <div id="error_explanation"> | |
| <h2><%= pluralize(@post.errors.count, "error") %> prohibited this post from being saved:</h2> | |
| <ul> | |
| <% @post.errors.full_messages.each do |msg| %> | |
| <li><%= msg %></li> | |
| <% end %> | |
| </ul> | |
| </div> | |
| <% end %> | |
| <div class="field"> | |
| <%= f.label :cause %><br /> | |
| <%= f.text_field :cause %> | |
| </div> | |
| <p> | |
| <label>Photo</label> | |
| <%= f.file_field :photo %> | |
| <%= f.hidden_field :photo_cache %> | |
| </p> | |
| <div class="actions"> | |
| <%= f.submit %> | |
| </div> | |
| <% end %> | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment