Class: NewController

Inherits:
Controller::Base
  • Object
show all
Includes:
Snippets::Template
Defined in:
app/controllers/new_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



5
6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'app/controllers/new_controller.rb', line 5

def index
  @project_name = params.shift
  @lucie_version = Lucie::VERSION

  template("new/bin/bin.tt", "#{@project_name}/bin/#{@project_name}")
  template("new/app/application_controller.rb.tt", "#{@project_name}/app/controllers/application_controller.rb")
  template("new/app/boot.rb.tt", "#{@project_name}/app/boot.rb")
  template("new/Gemfile.tt", "#{@project_name}/Gemfile")
  template("new/Rakefile.tt", "#{@project_name}/Rakefile")

  File.chmod(0755, "#{app.pwd}/#{@project_name}/bin/#{@project_name}")

  system "cd #{app.pwd}/#{@project_name} && rake setup"
end

#no_methodObject



20
21
22
# File 'app/controllers/new_controller.rb', line 20

def no_method
  index
end