class ModelGen::CreateModelGenerator
Public Instance Methods
create()
click to toggle source
# File lib/generators/model_gen/create_model/create_model_generator.rb, line 6 def create command = "rails g model #{name.downcase}" attributes.each do |field| command = command + " #{field.name.downcase}:#{field.type.downcase}" end system command system 'rake db:migrate' end