Class: Tigger::Generators::BackboneGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/tigger/backbone/backbone_generator.rb

Constant Summary collapse

@@backbone_version =
'0.9.1'
@@underscore_version =
'1.3.1'
@@icanhaz_version =
'0.10'

Instance Method Summary collapse

Instance Method Details

#insert_backbone_in_applicationjsObject



13
14
15
16
17
18
19
20
21
22
23
# File 'lib/generators/tigger/backbone/backbone_generator.rb', line 13

def insert_backbone_in_applicationjs
  inject_into_file "app/assets/javascripts/application.js", :before => "//= require_tree" do
    "//= require json2\n//= require underscore\n//= require backbone\n"
  end
  
  if options[:ich]
    inject_into_file "app/assets/javascripts/application.js", :before => "//= require_tree" do
      "//= require icanhaz\n"
    end
  end
end