Class: ClientSideValidations::Generators::InstallGenerator

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

Instance Method Summary collapse

Instance Method Details

#copy_initializerObject



8
9
10
# File 'lib/generators/client_side_validations/install_generator.rb', line 8

def copy_initializer
  copy_file 'client_side_validations.rb', 'config/initializers/client_side_validations.rb'
end

#copy_localeObject



12
13
14
# File 'lib/generators/client_side_validations/install_generator.rb', line 12

def copy_locale
  copy_file '../../../javascript/rails.validations.js', 'public/javascripts/rails.validations.js'
end

#show_readmeObject



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

def show_readme
  readme 'README' if behavior == :invoke
end