fix tests (involves changes to favorite set presenter)
This commit is contained in:
@@ -1,13 +1,13 @@
|
|||||||
module PostSetPresenters
|
module PostSetPresenters
|
||||||
class Favorite < Base
|
class Favorite < Base
|
||||||
attr_accessor :favorite_set, :tag_set_presenter
|
attr_accessor :post_set, :tag_set_presenter
|
||||||
delegate :favorites, :to => :favorite_set
|
delegate :favorites, :to => :post_set
|
||||||
|
|
||||||
def initialize(favorite_set)
|
def initialize(post_set)
|
||||||
@favorite_set = favorite_set
|
@post_set = post_set
|
||||||
@tag_set_presenter = TagSetPresenter.new(
|
@tag_set_presenter = TagSetPresenter.new(
|
||||||
RelatedTagCalculator.calculate_from_sample_to_array(
|
RelatedTagCalculator.calculate_from_sample_to_array(
|
||||||
favorite_set.tag_string
|
post_set.tag_string
|
||||||
).map {|x| x[0]}
|
).map {|x| x[0]}
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
@@ -17,7 +17,7 @@ module PostSetPresenters
|
|||||||
end
|
end
|
||||||
|
|
||||||
def posts
|
def posts
|
||||||
@posts ||= favorite_set.posts
|
@posts ||= post_set.posts
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user