0

I keep seeing two different config file naming conventions. One with an app name explicitly stated and another without (the default).

SomeApp::Application.configure do SomeApp::Application.config.assets.precompile += %w( someManifest.css.scss ) 

but the default is this

Rails.application.configure do Rails.application.config.assets.precompile += %w( someManifest.css.scss ) 

Is there a difference? The default seems to work...so why is the other option there?

1 Answer 1

1

This is a recent change to Rails. Older versions of Rails would use the app name, but in Rails 4, it uses the Rails.application version. If you're seeing a Rails4 app that's using the app name version, it was probably upgraded from Rails 3.

It's best to stick with convention, and use what is default with the version of Rails you're using. If that's 4, then use the Rails.application version.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.