* Renamed Post.find_by_tags into Post.tag_match, made into a full fledged scope

* Post.tag_match no longer takes an options hash (use other arel builders instead)
This commit is contained in:
albert
2011-01-28 17:40:22 -05:00
parent 7051b016f5
commit 2053e6ad8c
13 changed files with 35 additions and 139 deletions

View File

@@ -21,7 +21,7 @@ class ArtistsController < ApplicationController
@artist = Artist.find(params[:id])
if @artist
@posts = Danbooru.config.select_posts_visible_to_user(CurrentUser.user, Post.find_by_tags(@artist.name, :limit => 6))
@posts = Danbooru.config.select_posts_visible_to_user(CurrentUser.user, Post.tag_match(@artist.name).limit(6))
end
respond_with(@artist)