initializer(filename, data = nil) public

Creates an initializer file in config/initializers/. The code can be specified as an argument or as the return value of the block.

initializer "api.rb", <<~RUBY
  API_KEY = "123456"
RUBY

initializer "api.rb" do
  %(API_KEY = "123456")
end
Show source
Register or log in to add new notes.