Class: FormSubmitProtectorAssetsGenerator

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.source_rootObject



4
5
6
# File 'lib/generators/form_submit_protector_assets/form_submit_protector_assets_generator.rb', line 4

def self.source_root
  File.join( File.dirname(__FILE__), 'templates' )
end

Instance Method Details

#install_already_grid_assetsObject



8
9
10
11
12
13
# File 'lib/generators/form_submit_protector_assets/form_submit_protector_assets_generator.rb', line 8

def install_already_grid_assets
  copy_file "guilded.form_submit_protector.js", "public/javascripts/guilded.form_submit_protector.js"
  copy_file "guilded.form_submit_protector.min.js", "public/javascripts/guilded.form_submit_protector.min.js"
  copy_file "jquery-disable_on_submit-1.0.js", "public/javascripts/jquery/jquery-disable_on_submit-1.0.js"
  copy_file "jquery-disable_on_submit-1.0.min.js", "public/javascripts/jquery/jquery-disable_on_submit-1.0.min.js"
end