diff options
author | Philip Arndt <parndt@gmail.com> | 2010-11-22 15:23:25 +1300 |
---|---|---|
committer | Philip Arndt <parndt@gmail.com> | 2010-11-22 15:26:53 +1300 |
commit | e5b9af1054bbd259bde0265acf4386cdaab0ca41 (patch) | |
tree | a5a89e83d262aab943c7e3f5d22dc52788de24d8 /generators/refinery_blog/templates | |
parent | ebb4c59cef0eb4e89700275e23579ca6dd18d619 (diff) | |
parent | 6d94a0ba7b781f93519183c96bbc718465dccdb4 (diff) | |
download | refinerycms-blog-e5b9af1054bbd259bde0265acf4386cdaab0ca41.tar.gz refinerycms-blog-e5b9af1054bbd259bde0265acf4386cdaab0ca41.tar.bz2 refinerycms-blog-e5b9af1054bbd259bde0265acf4386cdaab0ca41.zip |
Merged in Joe's and Steven's forks and updated for compatibility with < 0.9.9. Also, specs now work by including the factories and I have also laid the foundation for cucumber features. Fixed an issue where the javascript file was clashing with the same code we merged to core from this engine relating to submenus. Regenerated gemspec.
Diffstat (limited to 'generators/refinery_blog/templates')
-rw-r--r-- | generators/refinery_blog/templates/db/migrate/migration.rb | 26 | ||||
-rw-r--r-- | generators/refinery_blog/templates/db/seeds/seed.rb | 16 |
2 files changed, 0 insertions, 42 deletions
diff --git a/generators/refinery_blog/templates/db/migrate/migration.rb b/generators/refinery_blog/templates/db/migrate/migration.rb deleted file mode 100644 index 5ba29c6..0000000 --- a/generators/refinery_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/refinery_blog/templates/db/seeds/seed.rb b/generators/refinery_blog/templates/db/seeds/seed.rb deleted file mode 100644 index 228fc7b..0000000 --- a/generators/refinery_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 |