From fd28f84531eb2b454fe513b595796badb09246a5 Mon Sep 17 00:00:00 2001 From: andrew Date: Wed, 9 Jan 2008 06:22:55 +0000 Subject: [PATCH] removing extra help stuff git-svn-id: http://svn.barleysodas.com/barleysodas/trunk@92 0f7b21a7-9e3a-4941-bbeb-ce5c7c368fa7 --- ...1_create_styles.rb => 010_create_syles.rb} | 0 db/migrate/010_help_start_page.rb | 21 ------------------- generate_permissions | 10 ++------- 3 files changed, 2 insertions(+), 29 deletions(-) rename db/migrate/{011_create_styles.rb => 010_create_syles.rb} (100%) delete mode 100644 db/migrate/010_help_start_page.rb diff --git a/db/migrate/011_create_styles.rb b/db/migrate/010_create_syles.rb similarity index 100% rename from db/migrate/011_create_styles.rb rename to db/migrate/010_create_syles.rb diff --git a/db/migrate/010_help_start_page.rb b/db/migrate/010_help_start_page.rb deleted file mode 100644 index acae868..0000000 --- a/db/migrate/010_help_start_page.rb +++ /dev/null @@ -1,21 +0,0 @@ -class HelpStartPage < ActiveRecord::Migration - def self.up -redcloths = " -h1. Thanks for using BarleySodas - -Please check out these topics for more specialized information. - -* [[Peoples]] -* [[Beers]] -* [[Breweries]] -* [[Discussions]] -* [[Pages]] -* [[Sessions]] -" - Page.create :title => 'HomePage', :owner_type => 'Help', :redcloth => redcloths - end - - def self.down - Page.destroy_all("owner_type = 'Help'") - end -end diff --git a/generate_permissions b/generate_permissions index 7a244c1..c438c9b 100644 --- a/generate_permissions +++ b/generate_permissions @@ -3,9 +3,8 @@ Permission.destroy_all base_actions = ApplicationController.action_methods # i should probably figure out all of the children of ApplicationController # rather than defining them here. -controllers = [ PagesController, HelpController, DiscussionsController, - PeoplesController, BeersController, BreweriesController, RolesController, - StylesController ] +controllers = [ PagesController, DiscussionsController, StylesController, + PeoplesController, BeersController, BreweriesController, RolesController ] controllers.each do |c| actions = c.action_methods - base_actions cname = c.controller_name @@ -18,11 +17,6 @@ Permission.find(:all, next if [ 'new', 'create', 'edit', 'update', 'destroy' ].include?(p.action) r.permissions << p end -Permission.find(:all, - :conditions => [ 'controller = ?', 'help' ]).each do |p| - next if [ 'new', 'create', 'edit', 'update', 'destroy' ].include?(p.action) - r.permissions << p -end Permission.find(:all, :conditions => [ 'controller = ?', 'styles' ]).each do |p| next if [ 'new', 'create', 'edit', 'update', 'destroy' ].include?(p.action)