Skip to content

Commit

Permalink
dropdown default to parent of page
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew vonderLuft committed Jun 27, 2011
1 parent 0109520 commit 63dd4f9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/helpers/copy_move_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ def page_parent_select_tag
list = homes.inject([]) do |l, home|
l.concat build_tree(home, [])
end
select_tag 'parent_id', options_for_select(list)
options = options_for_select list, (@page.parent ? @page.parent.id : nil)
select_tag 'parent_id', options
end

def build_tree(page, list, level = 0)
Expand Down

0 comments on commit 63dd4f9

Please sign in to comment.