Class ApplicationTable
In: app/models/application_table.rb
Parent: ActiveRecord::Base

アプリケーションで利用するテーブルのクラス

Methods

Included Modules

CUI

Public Instance methods

[Source]

    # File app/models/application_table.rb, line 32
32:   def create_table
33:     script_generate = Pathname.new(RAILS_ROOT) + "script/generate"
34:     rest = table_columns.map(&:spec)
35:     rest |= ['--pretend'] if pretend?
36:     system(ruby, script_generate.to_s, "application_table", name, *rest)
37:   end

[Source]

    # File app/models/application_table.rb, line 39
39:   def drop_table
40:     script_destroy = Pathname.new(RAILS_ROOT) + "script/destroy"
41:     rest = pretend? ? ['--pretend'] : []
42:     system(ruby, script_destroy.to_s, "application_table", name, *rest)
43:   end

[Validate]