Sha256: 06d035817d939f15e2a308797470738090e2de17d2b772d19b61bbd9fb52160d

Contents?: true

Size: 420 Bytes

Versions: 3

Compression:

Stored size: 420 Bytes

Contents

module RailsVoter
  class InstallGenerator < Rails::Generators::Base
    source_root File.expand_path("../templates", __FILE__)

    def add_routes
      route "mount RailsVoter::Engine, at: \"/rails_voter\""
    end

    def add_migrations
      rake("rails_voter:install:migrations")
      rake("db:migrate")
    end

    def add_seeds
      copy_file "seeds.rb", "db/seeds.rb"
      rake("db:seed")
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rails_voter-0.1.0 lib/generators/rails_voter/install/install_generator.rb
rails_voter-0.0.3 lib/generators/rails_voter/install/install_generator.rb
rails_voter-0.0.2 lib/generators/rails_voter/install/install_generator.rb