Module: BootstrapViewsGenerator::Helpers
- Defined in:
- lib/bootstrap_views_generator/helpers.rb
Instance Method Summary collapse
-
#app_name ⇒ String
Return a cleaned up version of the name of the application being generated.
Instance Method Details
#app_name ⇒ String
Return a cleaned up version of the name of the application being generated
7 8 9 10 11 12 13 14 |
# File 'lib/bootstrap_views_generator/helpers.rb', line 7 def app_name # Avoid deprecation errors when pulling the application name when using Rails > 6.0 @app_name ||= if Rails.version.to_f >= 6.0 Rails.app_class.module_parent_name.demodulize.titleize else Rails.application.class.parent.to_s.titleize end end |