Created
          May 26, 2012 23:52 
        
      - 
      
- 
        Save ptagell/2795655 to your computer and use it in GitHub Desktop. 
    List of goals 
  
        
  
    
      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
    
  
  
    
  | <% @goals.each do |goal| %> | |
| <% if goal.committments.count == 1 && goal.committments.first.private_goal == true %> | |
| <% else %> | |
| <li> | |
| <% if goal.committments.count > 1 %> | |
| <p><small><%= goal.committments.count %> people want to</small></p> | |
| <% else %> | |
| <p><small><%= goal.committments.count %> person wants to</small></p> | |
| <% end %> | |
| <blockquote> | |
| <p><%= goal.description %></p> | |
| <br> | |
| <small> | |
| <% if user_signed_in? %> | |
| <% goal.users.each do | user | %> | |
| <% if current_user == user %> | |
| You have this as a goal. Have you accomplished it yet? | |
| <% else %> | |
| <% end %> | |
| <% end %> | |
| <% end %> | |
| <%= link_to "I also want to do this", new_committment_path(:goal_id => goal.id)%> | |
| </small> | |
| </blockquote> | |
| </li> | |
| <% end %> | |
| <% end %> | 
        
      
            mattallen
  
      
      
      commented 
        May 26, 2012 
      
    
  
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment