* Refactored PostSet, splitting it into PostSets::Post and PostSets::Favorite

* Additional functional tests
This commit is contained in:
albert
2010-12-01 17:21:05 -05:00
parent f8ab736677
commit 39dd2e277a
20 changed files with 342 additions and 198 deletions

View File

@@ -1,6 +1,10 @@
class FavoritesController < ApplicationController
def index
@posts = CurrentUser.favorite_posts(params)
if params[:tags]
redirect_to(posts_path(:tags => "fav:#{CurrentUser.name} #{params[:tags]}"))
else
@posts = PostSets::Favorite.new(CurrentUser.user)
end
end
def create