-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
class Post < ActiveRecord::Base
attr_accessible :type
end
class Link < Post
end
irb(main):012:0> User.first.up_vote! Link.first
INSERT INTO votings (created_at, up_vote, updated_at, voteable_id, voteable_type, voter_id, voter_type) VALUES ('2012-10-14 07:15:41', 1, '2012-10-14 07:15:41', 62, 'Post', 1, 'User')
irb(main):013:0> User.first.up_voted? Link.first
MakeVoteable::Voting Load (0.3ms) SELECT votings.* FROM votings WHERE votings.voteable_type = 'Link' AND votings.voteable_id = 62 AND votings.voter_type = 'User' AND votings.voter_id = 1 LIMIT 1
=> false
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels