Skip to content

Instantly share code, notes, and snippets.

View StephenFiser's full-sized avatar

Stephen Fiser StephenFiser

View GitHub Profile
class Presenter < ActiveRecord::Base
attr_accessible :name
has_many :reports
belongs_to :team
def team_name
team.compound_team_name
end
end
class Presenter < ActiveRecord::Base
attr_accessible :name
has_many :reports
belongs_to :team
def team_name
team.compound_team_name
end
end
class Team < ActiveRecord::Base
attr_accessible :name
has_many :presenters
end
class Presenter < ActiveRecord::Base
attr_accessible :name
has_many :reports
belongs_to :team
class Team < ActiveRecord::Base
attr_accessible :name
has_many :presenters
def compound_team_name
name + '_' + department.id
end
end