* 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

@@ -159,7 +159,7 @@ class Artist < ActiveRecord::Base
Artist.new.tap do |artist|
if params[:name]
artist.name = params[:name]
post = Post.find_by_tags("source:http* #{artist.name}").first
post = Post.tag_match("source:http* #{artist.name}").first
unless post.nil? || post.source.blank?
artist.url_string = post.source
end