# GET /twits # GET /twits.xml def index if params[:target_user] target_user = User.find_by_name(params[:target_user]) @twits = Twit.find(:all, :conditions => [ "user_id = ?", target_user.id ], :order => 'created_at desc') else @twits = Twit.find(:all, :conditions => [ "user_id IN (?)", current_user.following_user_ids.push(current_user.id) ], :order => 'created_at desc') end @twit = Twit.new ....