maccman/supermodel — Issue #19: return nil when use 'find_by_xxx' 
Author: shaoyangyu
Created: 2012-02-29 03:03:02+00:00
State: open

Hello
I tried use SuperModel to connect Redis with AR , but I found it always return "nil" when use 'find_by_xxx' like below, any idea or it's my fault to use in such way ?

require "redis"
require 'supermodel'
class Hello < SuperModel::Base
include SuperModel::Redis::Model
attributes:yyy
end

h=Hello.new
h.yyy='test'
h.save

p Hello.find_by_yyy('test') #=>nil

p Hello.all #=>"test", "id"=>1}, @changed_attributes={"yyy"=>nil}>