Sha256: c913af31495fdccc75716d21a19ac9cf6dbf1ce7ab7aa84daa2e87cc7b67565f

Contents?: true

Size: 384 Bytes

Versions: 1

Compression:

Stored size: 384 Bytes

Contents

class Favorite < ActiveRecord::Base

    extend ActsAsFavoritor::FavoritorLib
    extend ActsAsFavoritor::FavoriteScopes

    serialize :types

    # NOTE: Follows 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.0 lib/generators/templates/model.rb