sms-pager/app/views/children/show.html.haml

22 lines
621 B
Plaintext
Raw Permalink Normal View History

2015-10-03 19:16:46 -05:00
%h2= @child.name
2015-10-04 20:27:03 -05:00
%ul.sub-nav
%li= link_to 'back', :back
%li= link_to 'edit', edit_child_path(@child)
2015-10-03 19:16:46 -05:00
- unless @child.parents.empty?
%p Parents:
%ul
- @child.parents.each do |parent|
%li
= link_to parent.name, parent_path(parent)
= link_to 'remove', del_parenthood_path(parent, @child), method: :delete
%p Add Parent:
= form_tag add_parent_to_child_path(@child) do
:ruby
select_options = options_from_collection_for_select(@parents, :id, :name)
html_options = { include_blank: true }
= select_tag(:parent, select_options, html_options)
= submit_tag 'Add Parent to Child'