When I create a rails application,
console:
rails new foo
Is the string "foo" available to my code?
puts "Your app's name is " + app_name_bar
Rails.application.class
will get you the full name of the application (eg. YourAppName::Application).
From there you can get the module name with Rails.application.class.parent
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With