Class: Generators::ModelsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Generators::ModelsController
- Defined in:
- app/controllers/signalman/generators/models_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
8 9 10 11 12 13 |
# File 'app/controllers/signalman/generators/models_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", "model", params[:model_name], *@fields) end end |
#show ⇒ Object
5 6 |
# File 'app/controllers/signalman/generators/models_controller.rb', line 5 def show end |