Application
参考:
class Rails::Application | Ruby on Rails API [Official]
アプリケーション名を取得する
Rails.application.class
に module_parent
もしくは module_parent_name
を使う。
Rails.application.class.module_parent # => MyRailsApp Rails.application.class.module_parent_name # => "MyRailsApp"
参考:
How does one get a Rails 3 “app name” | Ruby-Forum
How do I access the name of the Rails 3 application object? – Stack Overflow