class Project < ActiveRecord::Base belongs_to :portfolio has_one :project_manager has_many :milestones has_and_belongs_to_many :categories enddone. Now you can write:
if my_project.project_manager? joe
my_project.milestones << another_milestone
else
my_project.portfolio= some_pf
end
puts my_project.categories_count
(from http://ar.rubyonrails.org/classes/ActiveRecord/Associations/ClassMethods.html)
Yes, but: http://elixir.ematia.de/apidocs/elixir.relationships.html#dsl-based-syntax
I'm calling a GreencoddsTenthRuleOfProgramming on this one. --top