Class: SimpleFormWithClientValidation::Generators::InstallGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/simple_form_with_client_validation/install_generator.rb

Instance Method Summary collapse

Instance Method Details

#copy_configObject



16
17
18
# File 'lib/generators/simple_form_with_client_validation/install_generator.rb', line 16

def copy_config
  directory 'config'
end

#copy_scaffold_templateObject



20
21
22
23
# File 'lib/generators/simple_form_with_client_validation/install_generator.rb', line 20

def copy_scaffold_template
  engine = options[:template_engine]
  copy_file "_form.html.#{engine}", "lib/templates/#{engine}/scaffold/_form.html.#{engine}"
end

#info_bootstrapObject



9
10
11
12
13
14
# File 'lib/generators/simple_form_with_client_validation/install_generator.rb', line 9

def info_bootstrap
  return if options.bootstrap?
  puts "SimpleFormWithClientValidation supports Twitter bootstrap. In case you want to " \
    "generate bootstrap configuration, please re-run this " \
    "generator passing --bootstrap as option."
end

#show_readmeObject



25
26
27
28
29
# File 'lib/generators/simple_form_with_client_validation/install_generator.rb', line 25

def show_readme
  if behavior == :invoke && options.bootstrap?
    readme "README"
  end
end