* 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:
@@ -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)
|
||||
|
||||
@@ -30,7 +30,7 @@ class CommentsController < ApplicationController
|
||||
|
||||
private
|
||||
def index_by_post
|
||||
@posts = Post.find_by_tags(params[:tags]).commented_before(params[:before_date] || Time.now).limit(8)
|
||||
@posts = Post.tag_match(params[:tags]).commented_before(params[:before_date] || Time.now).limit(8)
|
||||
respond_with(@posts) do |format|
|
||||
format.html {render :action => "index_by_post"}
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user