Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 2nd, 2012  |  syntax: None  |  size: 1.49 KB  |  hits: 11  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1.   <%= f.fields_for :requirements do |requirement| %>
  2.     <% if requirement.object.persisted? %>
  3.       <h2>2. Que voulez-vous ? - <%= requirement.object.name %></h2>
  4.       <% p "==>> REQUIREMENT "%>
  5.       <% p requirement.object.skills.to_a %>
  6.       <% requirement.fields_for :skills do |skill| %>
  7.         <% p "==>> SKILL "%>
  8.         <% p skill.object %>
  9.       <% end %>
  10.     <% end %>
  11.   <% end %>
  12.  
  13.  
  14. RETURNS :
  15.  
  16.  
  17.  
  18. "==>> REQUIREMENT "
  19. [#<Skill _id: 4e15ff57c6e3ba8699000071, _type: nil, name: "Un réalisateur", explanation: nil>, #<Skill _id: 4e15ff57c6e3ba8699000072, _type: nil, name: "Une équipe de tournage", explanation: nil>, #<Skill _id: 4e15ff57c6e3ba8699000073, _type: nil, name: "Un ingé son clip", explanation: nil>, #<Skill _id: 4e15ff57c6e3ba8699000074, _type: nil, name: "Un preneur de son", explanation: nil>, #<Skill _id: 4e15ff57c6e3ba8699000075, _type: nil, name: "Un ingé son", explanation: nil>, #<Skill _id: 4e15ff57c6e3ba8699000076, _type: nil, name: "Un studio", explanation: nil>, #<Skill _id: 4e15ff57c6e3ba8699000077, _type: nil, name: "Un assistant", explanation: nil>, #<Skill _id: 4e15ff57c6e3ba8699000078, _type: nil, name: "Un mastering", explanation: nil>, #<Skill _id: 4e15ff57c6e3ba8699000079, _type: nil, name: "Un arrangeur", explanation: nil>, #<Skill _id: 4e15ff57c6e3ba869900007a, _type: nil, name: "Dr. Dre", explanation: nil>, #<Skill _id: 4e15ff57c6e3ba869900007b, _type: nil, name: "Encore un mec", explanation: nil>]
  20. "==>> SKILL "
  21. nil
  22. "==>> REQUIREMENT "
  23. []
  24. "==>> SKILL "
  25. nil