Skip to content

Commit

Permalink
updated rake task to work with Rails 2.1 + and ActiveRecord sessions …
Browse files Browse the repository at this point in the history
…[ 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.
12 changes: 7 additions & 5 deletions tasks/acts_as_taggable_tasks.rake
@@ -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

0 comments on commit 4b7d484

Please sign in to comment.