Method: Spina::InstallGenerator#set_theme

Defined in:
lib/generators/spina/install_generator.rb

#set_themeObject



37
38
39
40
41
42
43
44
45
46
47
# File 'lib/generators/spina/install_generator.rb', line 37

def set_theme
   = ::Spina::Account.first
  return if .theme.present? && !no?("Theme '#{.theme} is set. Skip? [Yn]")

  theme = begin
            theme = .theme || themes.first
            theme = ask("What theme do you want to use? (#{themes.join('/')}) [#{theme}]").presence || theme
          end until theme.in? themes

  .update_attribute(:theme, theme)
end