Home>

I want to create an email notification function using rails actionmailer, but I need a file to write config settings

cofig/environments/

write under

config/initializers/

What is the difference between the two

patterns?

  • Answer # 1

    cofig/environments/In the following file, write the configuration information that the Rails :: Application :: Configuration object has depending on the environment.

    config/initializers/contains initialization code used in any environment.

    …… There is a difference.

Related articles