I have a template that generates a rails app. The problem is that in my template scenario I substitute some files, like environment.rb, that need to know rails app name to run things like AppName::Application.initialize!
. I could get the app name from the command line arguments, but that's not always possible, since a user could do that: rails new ./
and the app name would be the name of the current dir then, but I would get nothing from the argument list.
So I'd like to know a certain way of getting a Rails app name in a template scenario.