Skip to content

Commit

Permalink
Merge pull request #1 from dwilkie/support_rails_4_2
Browse files Browse the repository at this point in the history
Use sql to search for encrypted record instead
  • Loading branch information
Ch4s3 committed Jan 28, 2015
2 parents a70488d + 4215eba commit 8cbfebb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/crypt_keeper/provider/mysql_aes_new.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def decrypt(value)
#
# Returns an Enumerable
def search(records, field, criteria)
records.select { |record| record[field] == criteria }
records.where("#{field} = ?", encrypt(criteria))
end
end
end
Expand Down

0 comments on commit 8cbfebb

Please sign in to comment.