Tables:
表:
apps:
ID (PK)
name
status_id (FK to status table)
status:
ID(PK)
name
class App < ActiveRecord::Base
belongs_to :status
end
class Status < ActiveRecord::Base
has_many :apps
end
apps:
ID (PK)
name
status_id (FKTables:
表:
apps:
ID (PK)
name
status_id (FK to status table)
status:
ID(PK)
name
class App < ActiveRecord::Base
belongs_to :status
end
class Status < ActiveRecord::Base
has_many :apps
end
apps:
ID (PK)
name
status_id (FK