Module: Ibham::ActsAsVoteable::ClassMethods

Defined in:
lib/ibham/acts_as_voteable.rb

Instance Method Summary collapse

Instance Method Details

#acts_as_voteableObject

To turn an abject to a voteable, call acts_as_voteable in the Active Record model class.

class Item < ActiveRecord::Base
  acts_as_voteable
end


13
14
15
16
17
# File 'lib/ibham/acts_as_voteable.rb', line 13

def acts_as_voteable
  class_eval do
    include Voteable
  end
end