Module: TailwindViewsGenerator::Helpers

Included in:
TailwindViews::Generators::DeviseGenerator, TailwindViews::Generators::InstallGenerator
Defined in:
lib/tailwind_views_generator/helpers.rb

Instance Method Summary collapse

Instance Method Details

#app_nameString

Return a cleaned up version of the name of the application being generated

Returns:

  • (String)


7
8
9
10
11
12
13
# File 'lib/tailwind_views_generator/helpers.rb', line 7

def app_name
  @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