I currently have the following models:
Users, which can have multiple blog posts, and a Forum with topics and
posts.
So a user can post a blog item, but also a topic/post on the forum
I want to give my users the ability to “watch” a blog post, or a forum
topic, so a little email will be sent when something happens on whatever
they’re watching.
I can’t get my head around a good solution to tackle this problem. I
want to have the possibily to extend my ‘watching’, because in the
future my users want to watch something else, so I was thinking along
the line of :polymorphic, but I can’t get it to work. Any ideas?..
topic, so a little email will be sent when something happens on whatever
they’re watching.
I can’t get my head around a good solution to tackle this problem. I
want to have the possibily to extend my ‘watching’, because in the
future my users want to watch something else, so I was thinking along
the line of :polymorphic, but I can’t get it to work. Any ideas?..
I think you’re on the right track with :polymorphic. However, some
sample
code would help in diagnosing your problem.
topic, so a little email will be sent when something happens on whatever
they’re watching.
I can’t get my head around a good solution to tackle this problem. I
want to have the possibily to extend my ‘watching’, because in the
future my users want to watch something else, so I was thinking along
the line of :polymorphic, but I can’t get it to work. Any ideas?..
I think you’re on the right track with :polymorphic. However, some
sample
code would help in diagnosing your problem.
Well, I don’t really have any sample code to share, since I am in the
process of trying to set it up. Except for maybe:
class User
has_many :blogposts
has_many :topics
has_many :forumposts
end
future my users want to watch something else, so I was thinking along
the line of :polymorphic, but I can’t get it to work. Any ideas?..
I think you’re on the right track with :polymorphic. However, some
sample
code would help in diagnosing your problem.
Well, I don’t really have any sample code to share, since I am in the
process of trying to set it up. Except for maybe:
Well you mentioned in your earlier post that you tried :polymorphic and
it
did not work. I was trying to determine “what did not work” with
:polymorphic.