Created
August 14, 2014 08:41
-
-
Save yosiyuki/623f92dc1eb4e9fefd71 to your computer and use it in GitHub Desktop.
Create page in RefineryCMS with ruby command
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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