Skip to content

Instantly share code, notes, and snippets.

@foca
Created August 14, 2008 15:07
Show Gist options
  • Save foca/5442 to your computer and use it in GitHub Desktop.
Save foca/5442 to your computer and use it in GitHub Desktop.
%ul
- for activity in @user.activity_feed
%li= render :partial => "activity", :object => activity
def render_activity(activity)
partial = case activity.activity_type
when :comment then "activities/comment"
else "activities/generic"
end
render :partial => partial, :object => activity
end
%ul
- for activity in @user.activity_feed
%li= render_activity(activity)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment