Skip to content

Commit

Permalink
Use .children instead of setting parent_id
Browse files Browse the repository at this point in the history
  • Loading branch information
parndt committed Jun 23, 2010
1 parent 0315f0f commit 8fb428a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions db/seeds/pages.rb
Expand Up @@ -47,13 +47,12 @@
})
contact_us_page_position = -1

thank_you_page = Page.create(:title => "Thank You",
thank_you_page = contact_us_page.children.create(:title => "Thank You",
:link_url => "/contact/thank_you",
:menu_match => "^/(inquiries|contact)/thank_you$",
:show_in_menu => false,
:deletable => false,
:position => (contact_us_page_position += 1),
:parent_id => contact_us_page.id)
:position => (contact_us_page_position += 1))
thank_you_page.parts.create({
:title => "Body",
:body => "<p>We've received your inquiry and will get back to you with a response shortly.</p><p><a href='/'>Return to the home page</a></p>",
Expand Down

0 comments on commit 8fb428a

Please sign in to comment.