3

i'm searching Days now for a Rate/Like Gem that allows me to rate/like an image just like the Facebook Like. I'm having that button hovering over my image:

enter image description here

and it would be nice if could access the Like Count and Display it. I would not post this if i didn't really searched it, but after DAYS, maybe someone knows a quick solution to my Problem.

Thanks

Mini John
  • 7,855
  • 9
  • 59
  • 108

1 Answers1

3

Did you tried acts_as_votable gem? if no, that's what you need

Usage:

class Pin < ActiveRecord::Base
  # ...
  acts_as_votable
end

class User < ActiveRecord::Base
  #...
  acts_as_voter
end

Helpful links

Community
  • 1
  • 1
Talgat Medetbekov
  • 3,741
  • 1
  • 19
  • 26
  • 1
    Hey Thanks, it really seems that's it. Do you have any experience with this gem because im getting some odd problems and im kinda new to rails . – Mini John Jul 17 '13 at 04:14
  • Sure, if you have any problem feel free to ask) – Talgat Medetbekov Jul 17 '13 at 04:19
  • Thanks :), so i added the Gem and the acts_as relations to my models (Users, Pins). If i understood this correctly i need only to add do my User model acts_as_voter and to my Pin model acts_as_votable, Correct? – Mini John Jul 17 '13 at 04:24
  • Cool, but from there i'm lost. How do i get the Like action. I have a button but what is the link? <%= @pin.what? %> – Mini John Jul 17 '13 at 04:39
  • You need to add this buttons manually, Here is best explanation how to add up/down buttons to `acts_as_votable` gem http://stackoverflow.com/questions/15012276/acts-as-votable-thumbs-up-down-buttons – Talgat Medetbekov Jul 17 '13 at 04:41
  • Cool, i got it from here. Not getting it right just now but you gave me enough Staff to Study. Thanks Talgat :) – Mini John Jul 17 '13 at 04:52