Skip to content

Instantly share code, notes, and snippets.

@tubbo
Created July 30, 2010 14:04
Show Gist options
  • Select an option

  • Save tubbo/500550 to your computer and use it in GitHub Desktop.

Select an option

Save tubbo/500550 to your computer and use it in GitHub Desktop.
# Shows all Follows for the current User, but only send who this User follows in an XML request.
def index
@following = Follow.find(:all, :conditions => {:follower_id => current_user.id})
@followers = Follow.find(:all, :conditions => {:followee_id => current_user.id})
@updates = nil
@following.each do |follow|
@updates += follow.user.timeline
end
respond_to do |format|
format.html # index.html.erb
format.xml {render :xml => @following}
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment