class RedPotion::Generators::CDQModel
Public Class Methods
source_root()
click to toggle source
# File lib/redpotion/generators/cdq_model.rb, line 12 def self.source_root File.dirname(__FILE__) end
Public Instance Methods
generate()
click to toggle source
# File lib/redpotion/generators/cdq_model.rb, line 16 def generate template "templates/cdq_model.tt", "app/models/#{model_name}.rb" check_for_previous_schema! template "templates/cdq_migration.tt", "schemas/#{new_schema_number}_create_#{model_name.underscore}.rb" end