Simple Activity Stream

Hey all,
I was wondering if anyone in here has an easy way to make a simple
activity stream. I understand the concepts around it, but haven’t been
able to get my code right. From what I understand, all the stream is a
separate table that gets populated with entries when given events
happen, say you login, or you follow someone.

If I have an events controller with the create action in it, should I
just call it from other controllers? For example, If I create a new
user, in the create action for the user controller would I also stick in
the code for the create action in the events controller? This seems
logical, but doesn’t seem like the appropriate way to do it.

Let me know what you think, any information would be helpful, thanks!

-Brian

Brian Michel wrote:
[…]

If I have an events controller with the create action in it, should I
just call it from other controllers? For example, If I create a new
user, in the create action for the user controller would I also stick in
the code for the create action in the events controller? This seems
logical, but doesn’t seem like the appropriate way to do it.

Why not use an observer?

Let me know what you think, any information would be helpful, thanks!

-Brian

Best,

Marnen Laibow-Koser
http://www.marnen.org
[email protected]

Marnen Laibow-Koser wrote:

Brian Michel wrote:
[…]

If I have an events controller with the create action in it, should I
just call it from other controllers? For example, If I create a new
user, in the create action for the user controller would I also stick in
the code for the create action in the events controller? This seems
logical, but doesn’t seem like the appropriate way to do it.

Why not use an observer?

Let me know what you think, any information would be helpful, thanks!

-Brian

Best,

Marnen Laibow-Koser
http://www.marnen.org
[email protected]

Marnen,
Would you please care to elaborate a little bit?

-Brian

Brian Michel wrote:

Marnen Laibow-Koser wrote:

Brian Michel wrote:
[…]

If I have an events controller with the create action in it, should I
just call it from other controllers? For example, If I create a new
user, in the create action for the user controller would I also stick in
the code for the create action in the events controller? This seems
logical, but doesn’t seem like the appropriate way to do it.

Why not use an observer?

Let me know what you think, any information would be helpful, thanks!

-Brian

Best,

Marnen Laibow-Koser
http://www.marnen.org
[email protected]

Marnen,
Would you please care to elaborate a little bit?

What part don’t you understand? Have you read the docs on observers in
Rails?

-Brian

Best,

Marnen Laibow-Koser
http://www.marnen.org
[email protected]