Tutorial by Examples

Configuration files for rails can be found in config/environments/. By default rails has 3 environments, development, production and test. By editing each file you are editing the configuration for that environment only. Rails also has a configuration file in config/application.rb. This is a common...
Database configuration of a rails project lies in a file config/database.yml. If you create a project using rails new command and don't specify a database engine to be used then rails uses sqlite as the default database. A typical database.yml file with default configuration will look similar to fol...
The following configuration options should be called on a Rails::Railtie object config.after_initialize: Takes a block which will be run after rails has initialized the application. config.asset_host: This sets the host for the assets. This is useful when using a Content Delivery Network. This i...
The following configuration options can be used for configuring assets config.assets.enabled: Determines whether the asset pipeline is enabled. This defaults to true config.assets.raise_runtime_errors: This enables runtime error checking. It's useful for development mode config.assets.compress:...
Rails allows you to configure what generators are used when running rails generate commands. This method, config.generators takes a block config.generators do |g| g.orm :active_record g.test_framework :test_unit end Here are some of the options OptionDescriptionDefaultassetsCreates asset...

Page 1 of 1