-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
hi mates,
I include Opinions in my models and add initializers/opinions.rb to configure redis. But it didn't work. did I miss anything?
thanks.
class User < ActiveRecord::Base
include Opinions::Opinionated
opinions :like
endclass Album < ActiveRecord::Base
include Opinions::Pollable
opinions :like
endOpinions.backend = Opinions::RedisBackend.new
Opinions.backend.redis = Redis.new(:host => 'localhost', :port => 6379) User.first.like(Album.first)
NoMethodError: undefined method 'like' for #< User:0x007f88be72e798 >
from /Users/joshchang/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/activemodel-3.2.3/lib/active_model/attribute_methods.rb:407:in 'method_missing'
from /Users/joshchang/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/activerecord-3.2.3/lib/active_record/attribute_methods.rb:148:in 'method_missing'
from (irb):1
...
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels