Sha256: b6d4f71e4c5c3b93f884bdfa64af93ee5684a7381ef4a9c66e7d10ab3cfd020b

Contents?: true

Size: 784 Bytes

Versions: 2

Compression:

Stored size: 784 Bytes

Contents

module Locomotive
  class InstallGenerator < Rails::Generators::Base

    def self.source_root
      @_locomotive_source_root ||= File.expand_path('../templates', __FILE__)
    end

    def copy_initializer
      template 'locomotive.rb', 'config/initializers/locomotive.rb'
    end
    
    def seed_db
      append_file 'db/seeds.rb', %{
# Uncomment the following lines if you want to create the first website / account
#account = Account.create! :name => 'Admin', :email => 'admin@example.com', :password => 'locomotive', :password_confirmation => 'locomotive'
#site = Site.new :name => 'Locomotive test website', :subdomain => 'test'
#site.memberships.build :account => account, :admin => true
#site.save!}
    end
    
    def show_readme
      readme 'README'
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
locomotive_cms-0.0.3.3 lib/generators/locomotive/install/install_generator.rb
locomotive_cms-0.0.3.1 lib/generators/locomotive/install/install_generator.rb