Class: JavascriptGenerator

Inherits:
Genosaurus
  • Object
show all
Defined in:
lib/mack-javascript/generators/javascript_generator.rb

Overview

This will generate required RJS support in your application.

example:

rake generate:javascript

Instance Method Summary collapse

Instance Method Details

#js_frameworkObject

:nodoc:



16
17
18
# File 'lib/mack-javascript/generators/javascript_generator.rb', line 16

def js_framework # :nodoc:
  configatron.mack.js_framework
end

#setupObject



8
9
10
11
12
13
14
# File 'lib/mack-javascript/generators/javascript_generator.rb', line 8

def setup
  error = %{  'js_framework' is not specified in your configatron/default.rb file.
    To fix this error, please open your {PROJ}/config/configatron/default.rb file, then uncomment 
    the line that says "# js_framework: jquery" (or prototype, if you specified prototype as the js framework).
    Once you have uncomment that line, please re-run 'rake generate:javascript' again. Thanks!}
  raise error if configatron.mack.js_framework.nil?
end