Class: Jax::Generators::ApplicationGenerator

Inherits:
NamedBase
  • Object
show all
Defined in:
lib/generators/jax/application/application_generator.rb

Instance Method Summary collapse

Methods included from SourceRoot

#source_root

Methods included from CoffeeGenerator

included

Instance Method Details

#create_jax_application_controllerObject



13
14
15
16
# File 'lib/generators/jax/application/application_generator.rb', line 13

def create_jax_application_controller
  coffee_template_with_fallback "application_controller.js",
    File.join(file_name, 'app/assets/jax/controllers/application_controller.js')
end

#create_jax_application_helperObject



18
19
20
21
# File 'lib/generators/jax/application/application_generator.rb', line 18

def create_jax_application_helper
  coffee_template_with_fallback "application_helper.js",
    File.join(file_name, 'app/assets/jax/helpers/application_helper.js')
end

#generate_applicationObject



9
10
11
# File 'lib/generators/jax/application/application_generator.rb', line 9

def generate_application
  directory "app", file_name
end

#run_bundleObject



23
24
25
26
27
# File 'lib/generators/jax/application/application_generator.rb', line 23

def run_bundle
  inside file_name do
    bundle_command('install') unless options[:skip_bundle]
  end
end