Ruby/Rails lentelių asociacijos: Skirtumas tarp puslapio versijų

S
nėra keitimo aprašymo
S
 
S
# tasks(id, project_id, title)
 
Project
has_many :tasks
 
has_and_belongs_to_many
 
 
 
class Project < ActiveRecord::Base
belongs_to :portfolio
has_one :project_manager
has_many :milestones
end
 
Our project objects are now able to respond to methods such as project.portfolio, project.has_project_manager?, and project.create_in_milestones("deadline" => Date.today + 5).
134

pakeitimai