aboutsummaryrefslogtreecommitdiffstats
path: root/generators/refinerycms_blog/templates
diff options
context:
space:
mode:
authorPhilip Arndt <parndt@gmail.com>2011-03-04 11:45:41 +1300
committerPhilip Arndt <parndt@gmail.com>2011-03-04 11:45:41 +1300
commit0f84b6363986a338fbee47e1ff25639add4b6fc5 (patch)
treeabdf9e755cc3620d68defde5c532e7621c4b2a37 /generators/refinerycms_blog/templates
parent1b33909b91ecc08fbbee67667c99f0a9765de71e (diff)
downloadrefinerycms-blog-0f84b6363986a338fbee47e1ff25639add4b6fc5.tar.gz
refinerycms-blog-0f84b6363986a338fbee47e1ff25639add4b6fc5.tar.bz2
refinerycms-blog-0f84b6363986a338fbee47e1ff25639add4b6fc5.zip
We no longer support Rails 2 on this engine so I'm removing the old generator.
Diffstat (limited to 'generators/refinerycms_blog/templates')
-rw-r--r--generators/refinerycms_blog/templates/db/migrate/migration.rb26
-rw-r--r--generators/refinerycms_blog/templates/db/seeds/seed.rb16
2 files changed, 0 insertions, 42 deletions
diff --git a/generators/refinerycms_blog/templates/db/migrate/migration.rb b/generators/refinerycms_blog/templates/db/migrate/migration.rb
deleted file mode 100644
index 5ba29c6..0000000
--- a/generators/refinerycms_blog/templates/db/migrate/migration.rb
+++ /dev/null
@@ -1,26 +0,0 @@
-class <%= migration_name %> < ActiveRecord::Migration
-
- def self.up<% tables.each do |table| %>
- create_table :<%= table[:table_name] %>, :id => <%= table[:id].to_s %> do |t|
-<% table[:attributes].each do |attribute| -%>
- t.<%= attribute.type %> :<%= attribute.name %>
-<% end -%>
- <%= 't.timestamps' if table[:id] %>
- end
-
- <%= "add_index :#{table[:table_name]}, :id" if table[:id] %>
-<% end -%>
- load(Rails.root.join('db', 'seeds', 'refinerycms_blog.rb').to_s)
- end
-
- def self.down
- UserPlugin.destroy_all({:name => "refinerycms_blog"})
-
- Page.delete_all({:link_url => "/blog"})
-
-<% tables.each do |table| -%>
- drop_table :<%= table[:table_name] %>
-<% end -%>
- end
-
-end
diff --git a/generators/refinerycms_blog/templates/db/seeds/seed.rb b/generators/refinerycms_blog/templates/db/seeds/seed.rb
deleted file mode 100644
index 228fc7b..0000000
--- a/generators/refinerycms_blog/templates/db/seeds/seed.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-User.find(:all).each do |user|
- user.plugins.create(:name => "<%= singular_name %>",
- :position => (user.plugins.maximum(:position) || -1) +1)
-end
-
-page = Page.create(
- :title => "Blog",
- :link_url => "/blog",
- :deletable => false,
- :position => ((Page.maximum(:position, :conditions => {:parent_id => nil}) || -1)+1),
- :menu_match => "^/blogs?(\/|\/.+?|)$"
-)
-
-RefinerySetting.find_or_set(:default_page_parts, %w(Body Side\ Body)).each do |default_page_part|
- page.parts.create(:title => default_page_part, :body => nil)
-end