Sha256: d5d6d01640b0b95ee24ca8a236e20be54900972645de4d08141cdc85562b54cc

Contents?: true

Size: 386 Bytes

Versions: 1

Compression:

Stored size: 386 Bytes

Contents

class Favorite < ActiveRecord::Base

    extend ActsAsFavoritor::FavoritorLib
    extend ActsAsFavoritor::FavoriteScopes

    serialize :lists

    # NOTE: Favorites belong to the 'favoritable' and 'favoritor' interface
    belongs_to :favoritable, polymorphic: true
    belongs_to :favoritor, polymorphic: true

    def block!
        self.update_attribute :blocked, true
    end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
acts_as_favoritor-1.0.1 lib/generators/templates/model.rb