Skip to content

Instantly share code, notes, and snippets.

@yosiyuki
Created August 14, 2014 08:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yosiyuki/623f92dc1eb4e9fefd71 to your computer and use it in GitHub Desktop.
Save yosiyuki/623f92dc1eb4e9fefd71 to your computer and use it in GitHub Desktop.
Create page in RefineryCMS with ruby command
p = Refinery::Page.create(
title: '北海道',
custom_slug: 'hokkaido',
parent_id: 40,
layout_template: 'application',
view_template: 'show'
)
Refinery::PagePart.create!([
{refinery_page_id: p.id, title: 'Body', body: "<p>北海道のページ</p>"}
])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment