Files
danbooru/app/logical/post_sets/artist.rb
2013-03-19 23:10:10 +11:00

21 lines
364 B
Ruby

module PostSets
class Artist < PostSets::Post
attr_reader :artist
def initialize(artist)
super(artist.name)
@artist = artist
end
def posts
::Post.tag_match(@artist.name).limit(10)
rescue ::Post::SearchError
::Post.where("false")
end
def presenter
::PostSetPresenters::Post.new(self)
end
end
end