instance method
application_name
Ruby on Rails 4.2.9
Since v3.0.20Signature
application_name()
Tries to retrieve the application name or simple return application.
Source
# File railties/lib/rails/generators/named_base.rb, line 149
def application_name
if defined?(Rails) && Rails.application
Rails.application.class.name.split('::').first.underscore
else
"application"
end
end
Defined in railties/lib/rails/generators/named_base.rb line 149
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in Rails::Generators::NamedBase