aboutsummaryrefslogtreecommitdiffstats
path: root/lib/generators/refinery
diff options
context:
space:
mode:
authorJames Thompson <james.b.thompson@gmail.com>2012-03-14 11:40:16 +0200
committerJames Thompson <james.b.thompson@gmail.com>2012-03-14 11:40:16 +0200
commit56d7747f54e86993415b76c92e101608e5ea44e2 (patch)
tree025b7b37f50c4c291e7e676286e7767c40adb1f9 /lib/generators/refinery
downloadrefinerycms-pc_banners-56d7747f54e86993415b76c92e101608e5ea44e2.tar.gz
refinerycms-pc_banners-56d7747f54e86993415b76c92e101608e5ea44e2.tar.bz2
refinerycms-pc_banners-56d7747f54e86993415b76c92e101608e5ea44e2.zip
initial commit
Diffstat (limited to 'lib/generators/refinery')
-rw-r--r--lib/generators/refinery/banners_generator.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/generators/refinery/banners_generator.rb b/lib/generators/refinery/banners_generator.rb
new file mode 100644
index 0000000..f799d9d
--- /dev/null
+++ b/lib/generators/refinery/banners_generator.rb
@@ -0,0 +1,18 @@
+module Refinery
+ class BannersGenerator < Rails::Generators::Base
+
+ def rake_db
+ rake("refinery_banners:install:migrations")
+ end
+
+ def append_load_seed_data
+ create_file 'db/seeds.rb' unless File.exists?(File.join(destination_root, 'db', 'seeds.rb'))
+ append_file 'db/seeds.rb', :verbose => true do
+ <<-EOH
+
+Refinery::Banners::Engine.load_seed
+ EOH
+ end
+ end
+ end
+end