Sha256: 01ee1b216e01ec8838f1f23ad798b34b2318d07f5ff11b720cbeb088627be169

Contents?: true

Size: 364 Bytes

Versions: 10

Compression:

Stored size: 364 Bytes

Contents

class Favorite < ActiveRecord::Base

    extend ActsAsFavoritor::FavoritorLib
    extend ActsAsFavoritor::FavoriteScopes

    # 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

10 entries across 10 versions & 1 rubygems

Version Path
acts_as_favoritor-2.0.0 lib/generators/templates/model.rb
acts_as_favoritor-1.5.0 lib/generators/templates/model.rb
acts_as_favoritor-1.4.0 lib/generators/templates/model.rb
acts_as_favoritor-1.3.2 lib/generators/templates/model.rb
acts_as_favoritor-1.2.2 lib/generators/templates/model.rb
acts_as_favoritor-1.2.1 lib/generators/templates/model.rb
acts_as_favoritor-1.2.0 lib/generators/templates/model.rb
acts_as_favoritor-1.1.3 lib/generators/templates/model.rb
acts_as_favoritor-1.1.2 lib/generators/templates/model.rb
acts_as_favoritor-1.1.0 lib/generators/templates/model.rb