Sha256: b74444de534a7e4e7d8fb90673dbbf60995815980414930bd4f212c0eafc3e77

Contents?: true

Size: 729 Bytes

Versions: 1

Compression:

Stored size: 729 Bytes

Contents

gem 'activerecord', '~> 3.2'
gem 'sqlite3'

template 'activerecord/models.rb', 'models.rb'
require_models_code = <<-CODE
  # Enable code reloading for models
  require_dependency 'models'
CODE
inject_into_file 'tiny_rails_controller.rb', "\n#{require_models_code}", :after => /class TinyRailsController < ActionController::Base/

config_db_code = <<-CODE
  def config.database_configuration
    {
      'development' =>
        {
          'adapter'  => 'sqlite3',
          'database' => 'db.sqlite3',
          'pool'     => 5,
          'timeout'  => 5000
        }
    }
  end
CODE
application "\n#{config_db_code}"

template 'activerecord/migrate', 'migrate'
chmod 'migrate', 0755

append_to_file '.gitignore', 'db.sqlite3'

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tiny-rails-0.0.2 addons/activerecord.rb