summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorhukl <contact@smyck.org>2009-03-02 20:29:25 +0100
committerhukl <contact@smyck.org>2009-03-03 19:47:18 +0100
commit82f16e71d49350c1ad4aa48773db5d0f45a55c6c (patch)
tree72a341b68e2b1f35772e11add0bef7208e9b90b6 /db
parentc9183349c2fbacf24fca5cd7767190d069ce8873 (diff)
introducing page templates - need to add edit capabilities
renamed the custom template folder forgot one fix for the new custom template path page templates refined renamed page attribute template to template_name as i suspected it to be a reserved word. it still didn't work until i discovered that simon defined the accessible attributes! That costed me 40 minutes of lifetime. But he apologized ;) tests for public and custom page templates
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20090302184350_add_template_column_to_pages.rb9
-rw-r--r--db/migrate/20090302215335_rename_template_to_template_name.rb9
2 files changed, 18 insertions, 0 deletions
diff --git a/db/migrate/20090302184350_add_template_column_to_pages.rb b/db/migrate/20090302184350_add_template_column_to_pages.rb
new file mode 100644
index 0000000..e3aac66
--- /dev/null
+++ b/db/migrate/20090302184350_add_template_column_to_pages.rb
@@ -0,0 +1,9 @@
1class AddTemplateColumnToPages < ActiveRecord::Migration
2 def self.up
3 add_column :pages, :template, :string
4 end
5
6 def self.down
7 remove_column :pages, :template
8 end
9end
diff --git a/db/migrate/20090302215335_rename_template_to_template_name.rb b/db/migrate/20090302215335_rename_template_to_template_name.rb
new file mode 100644
index 0000000..288209e
--- /dev/null
+++ b/db/migrate/20090302215335_rename_template_to_template_name.rb
@@ -0,0 +1,9 @@
1class RenameTemplateToTemplateName < ActiveRecord::Migration
2 def self.up
3 rename_column :pages, :template, :template_name
4 end
5
6 def self.down
7 rename_column :pages, :template_name, :template
8 end
9end