23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
# File 'lib/generators/boring/simple_form/install/install_generator.rb', line 23
def run_simple_form_generator
return if options[:skip_generator]
say "Running SimpleForm Generator", :green
if options[:css_framework].present? && ALLOWED_CSS_FRAMEWORK.include?(options[:css_framework])
run "DISABLE_SPRING=1 bundle exec rails generate simple_form:install --#{options[:css_framework]}"
elsif options[:css_framework].present?
say " ERROR: Invalid option css_framework: \#{options[:css_framework]}. Generator allows css_framework: \#{ALLOWED_CSS_FRAMEWORK.join(\", \")}\n WARNING\n else\n run \"rails generate simple_form:install\"\n end\nend\n", :red
|