Files
grecia/db/pages/privacy.rb
2021-04-08 19:15:06 +01:00

14 lines
413 B
Ruby

def generate_content(page)
page.title = I18n.t("pages.privacy.title")
page.content = I18n.t("pages.privacy.subtitle")
page.save!
end
if SiteCustomization::Page.find_by(slug: "privacy").nil?
page = SiteCustomization::Page.new(slug: "privacy", status: "published")
page.print_content_flag = true
I18n.available_locales.each do |locale|
I18n.with_locale(locale) { generate_content(page) }
end
end