Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <%= form.error_messages %>
- <p><%= form.text_field(:name) %></p>
- <p><%= form.text_area(:description) %></p>
- <%# Here the fun begins. I know accepts_nested_attributes_for, fields_for, but it just somehow doesn't seem to be working with this usecase. %>
- <% Skill.all.each do |skill| %>
- <p>
- <%= skill.name %>
- <input type="checkbox" name="profession[skill_ids][]" value="<%= skill.id %>" <%= "checked" if @profession.skills.include?(skill)%> />
- </p>
- <% end %>
- <p><%= form.submit(label) %></p>
Add Comment
Please, Sign In to add comment