Sha256: 1f9b6018b525ed66e38f3ca1bcab51ddb654172027f812838cfcd491435b00a4

Contents?: true

Size: 1.08 KB

Versions: 4

Compression:

Stored size: 1.08 KB

Contents

class CreateKuztuscmsLayouts < ActiveRecord::Migration
  def change
    create_table :kuztuscms_layouts do |t|
      t.text :body
      t.string :path
      t.string :format
      t.string :locale
      t.string :handler
      t.boolean :partial, :default => false

      t.timestamps
    end

    body = <<EOF
<!DOCTYPE html>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <meta name="keywords" content="<%= Kuztuscms.page.keywords %>" />
  <meta name="description" content="<%= Kuztuscms.page.description %>" />
  <title><%= Kuztuscms.page.title %></title>
  <%= stylesheet_link_tag    "application", :media => "all" %>
  <%= javascript_include_tag "application" %>
  <%= csrf_meta_tags %>
</head>
<body>
  <%= render Kuztuscms.template_path('google-analytics') %>
  <p class=notice><%= notice %></p>
  <p class=alert><%= alert %></p>
  <%= yield %>
</body>
</html>
EOF
    Kuztuscms::Layout.create(
      :body => body, 
      :path => 'default', 
      :format => 'html', 
      :locale => 'en', 
      :handler => 'erb', 
      :partial => false
    )
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
kuztuscms-0.0.10 db/migrate/20120311173954_create_kuztuscms_layouts.rb
kuztuscms-0.0.9 db/migrate/20120311173954_create_kuztuscms_layouts.rb
kuztuscms-0.0.8 db/migrate/20120311173954_create_kuztuscms_layouts.rb
kuztuscms-0.0.7 db/migrate/20120311173954_create_kuztuscms_layouts.rb