Class: Sbdevpadi::Generators::InstallGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/sbdevpadi/install_generator.rb

Instance Method Summary collapse

Instance Method Details

#filesObject



15
16
17
# File 'lib/generators/sbdevpadi/install_generator.rb', line 15

def files
  inject_into_file "app/assets/stylesheets/sass.scss", "\n@import 'sbdev_padi';\n", :after => "@import 'sbdev_core';"
end

#migrationsObject



6
7
8
9
# File 'lib/generators/sbdevpadi/install_generator.rb', line 6

def migrations
  rake "sbdevpadi:install:migrations"
  rake "db:migrate"
end

#seedsObject



19
20
21
# File 'lib/generators/sbdevpadi/install_generator.rb', line 19

def seeds
  Sbdevpadi::Engine.load_seed
end

#set_routesObject



11
12
13
# File 'lib/generators/sbdevpadi/install_generator.rb', line 11

def set_routes
  route "Sbdevpadi::Routes.draw(self)"
end