aboutsummaryrefslogtreecommitdiffstats
path: root/lib/generators/refinery/banners_generator.rb
blob: f799d9d2a8882e07c0c1f78330be312f4250b381 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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