Class: PluggableJsGenerator

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

Instance Method Summary collapse

Instance Method Details

#create_pluggable_js_filesObject



6
7
8
9
10
11
# File 'lib/generators/pluggable_js/pluggable_js_generator.rb', line 6

def create_pluggable_js_files
  actions.each do |action|
    @action = action
    template 'large_piece_of_code.js.coffee', File.join('app/assets/javascripts/pluggable', controller_name, "#{action}.js.coffee")
  end
end