Good question (probably belongs on the wiki).  Basically, you just need to
declare that the item 'acts_as_activity' and then tell the _unhandled_item
partial how to handle that type of activity item.
See this gist for a generic example: http://gist.github.com/200854

So in your case, there's probably a WishlistItem model with user_id and
wishlist_id attributes. So you might do something like:

#models/wishlist_item.rb
class WishlistItem < ActiveRecord::Base
  belongs_to :user

  belongs_to :wishlist
  acts_as_activity :user
end

#views/activities/_unhandled_item.html.haml
- case activity.item_type
  - when 'WishlistItem'
    ="added an item to their wishlist: #{link_to(activity.item.name,
wishlist_path(activity.item.wishlist))}"



Good luck! Please let me know if you have any other questions.
Bruno Bornsztein
Curbly, LLC


On Fri, Oct 2, 2009 at 7:39 PM, LostyJai <[email protected]> wrote:

>
> Hi,
>
> I've created a custom section called wishlists, which allows users to
> add improvements to their wishlists.
>
> What I want to do is everytime a user adds an item to their wishlist,
> it will show up in the activity feed.
>
> How would I go about doing this?
>
> Regards,
> Simon
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CommunityEngine" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/communityengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to