improved artist test

This commit is contained in:
albert
2013-01-11 16:38:06 -05:00
parent 8749c43b3e
commit c7ffda81bf
4 changed files with 20 additions and 1 deletions

View File

@@ -6,6 +6,10 @@ class ArtistVersion < ActiveRecord::Base
q = scoped
return q if params.blank?
if params[:name]
q = q.where("name like ? escape E'\\\\'", params[:name].to_escaped_for_sql_like)
end
if params[:artist_id]
q = q.where("artist_id = ?", params[:artist_id].to_i)
end