I have a rails project where project model has many issues.
class Project < ActiveRecord::Base
has_many :issues
end
Now through a plugin i want to add an association in the project model, say has_many :activities
so that project model will look like
class Project < ActiveRecord::Base
has_many :issues
has_many :activities
end
where activity is a model of my plugin.
Can this be done using hooks? Please give some example.
Give this a whirl: