Class: ModelGen::RelationsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- ModelGen::RelationsController
- Defined in:
- app/controllers/model_gen/relations_controller.rb
Instance Method Summary collapse
Methods inherited from ApplicationController
Instance Method Details
#create ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'app/controllers/model_gen/relations_controller.rb', line 10 def create command = "rails g model_gen:define_relations #{params[:name]}" params[:relations].each do |index, relation| command = command + " #{relation[:model].downcase}:#{relation[:type].downcase}" end system command redirect_to new_relations_path end |
#new ⇒ Object
6 7 8 |
# File 'app/controllers/model_gen/relations_controller.rb', line 6 def new end |