class Starter::StyleGenerator

Public Instance Methods

generate_layout() click to toggle source
# File lib/generators/starter/style/style_generator.rb, line 11
def generate_layout
  if bootswatch_theme?
    log :insert, "Bootswatch theme '#{theme_name}'"
  else
    log :insert, 'Bootstrap CSS framework'
  end
  log :insert, 'FontAwesome support'
  template "layout.html.erb", "app/views/layouts/#{layout_file}.html.erb" if options[:layout]
end

Protected Instance Methods

app_tables() click to toggle source
# File lib/generators/starter/style/style_generator.rb, line 29
def app_tables
  ActiveRecord::Base.connection.tables - ['schema_migrations']
end
bootswatch_theme?() click to toggle source
# File lib/generators/starter/style/style_generator.rb, line 23
def bootswatch_theme?
  if theme_name.present?
    (theme_name.downcase != 'default') && (theme_name.downcase != 'd')
  end
end