Class: Generators::ScaffoldsController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/signalman/generators/scaffolds_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



8
9
10
11
12
13
# File 'app/controllers/signalman/generators/scaffolds_controller.rb', line 8

def create
  @fields = params[:fields].map{ |field| [field[:name], field[:type]].join(":") }
  Bundler.with_original_env do
    @stdout, @stderr, @status = Open3.capture3("rails", "generate", "scaffold", params[:model_name], *@fields)
  end
end

#showObject



5
6
# File 'app/controllers/signalman/generators/scaffolds_controller.rb', line 5

def show
end