Parent

Methods

Rails::Railtie::Configuration

Public Instance Methods

compass() click to toggle source

Adds compass configuration accessor to the application configuration.

If a configuration file for compass exists, it will be read in and the project's configuration values will already be set on the config object.

For example:

module MyApp
  class Application < Rails::Application
     config.compass.line_comments = !Rails.env.production?
     config.compass.fonts_dir = "app/assets/fonts"
  end
end

It is suggested that you create a compass configuration file if you want a quicker boot time when using the compass command line tool.

For more information on available configuration options see: compass-style.org/help/tutorials/configuration-reference/

# File lib/compass-rails/railties/3_0.rb, line 26
def compass
  @compass ||= begin
    data = if (config_file = Compass.detect_configuration_file) && (config_data = Compass.configuration_for(config_file))
      config_data
    else
      Compass::Configuration::Data.new("project")
    end
    data.project_type = :rails # Forcing this makes sure all the rails defaults will be loaded.
    data
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.