Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updated rake task to work with Rails 2.1 + and ActiveRecord sessions …
…[ David Lee ]
- Loading branch information
David Lee
committed
Aug 12, 2008
1 parent
941a869
commit 4b7d484
Showing
1 changed file
with
7 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,21 @@ | ||
|
||
namespace :acts_as_taggable do | ||
require 'rails_generator' | ||
require 'rails_generator/scripts/generate' | ||
|
||
namespace :db do | ||
desc "Creates tag tables for use with acts_as_taggable" | ||
task :create => :environment do | ||
require 'rails_generator' | ||
require 'rails_generator/scripts/generate' | ||
raise "Task unavailable to this database (no migration support)" unless ActiveRecord::Base.connection.supports_migrations? | ||
Rails::Generator::Scripts::Generate.new.run([ "acts_as_taggable_tables", "add_acts_as_taggable_tables" ]) | ||
end | ||
end | ||
|
||
namespace :stylesheet do | ||
desc "Create tag stylesheet for use with acts_as_taggable" | ||
task :create do | ||
task :create => :environment do | ||
require 'rails_generator' | ||
require 'rails_generator/scripts/generate' | ||
Rails::Generator::Scripts::Generate.new.run([ "acts_as_taggable_stylesheet" ]) | ||
end | ||
end | ||
end | ||
end |