| Class | ApplicationModel |
| In: |
app/models/application_model.rb
|
| Parent: | ActiveRecord::Base |
-*- coding: utf-8 -*-
Schema version: 87
Table name: application_models
id :integer not null, primary key domain_id :integer not null application_table_id :integer not null name :string(255) not null parent_method_name :string(255) created_at :string(14) updated_at :string(14) created_by :integer updated_by :integer created_in :integer updated_in :integer lock_version :integer default(0), not null
# File app/models/application_model.rb, line 33
33: def create_model
34: script_generate = Pathname.new(RAILS_ROOT) + "script/generate"
35: rest = ["table_name:#{table_name}", "parent_method_name:#{parent_method_name}"]
36: rest |= ['--pretend'] if pretend?
37: system(ruby, script_generate.to_s, "application_model", name, *rest)
38: end
# File app/models/application_model.rb, line 40
40: def drop_model
41: script_destroy = Pathname.new(RAILS_ROOT) + "script/destroy"
42: rest = pretend? ? ['--pretend'] : []
43: system(ruby, script_destroy.to_s, "application_model", name, *rest)
44: end