Sha256: 556f78eed5f1a05187d5fe5b68e89cebc341d6c45f88cc5bea6f13f306aa4eb9

Contents?: true

Size: 286 Bytes

Versions: 3

Compression:

Stored size: 286 Bytes

Contents

# frozen_string_literal: true

class Favorite < ActiveRecord::Base
  extend ActsAsFavoritor::FavoritorLib
  extend ActsAsFavoritor::FavoriteScopes

  belongs_to :favoritable, polymorphic: true
  belongs_to :favoritor, polymorphic: true

  def block!
    update(blocked: true)
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
acts_as_favoritor-2.1.2 lib/generators/templates/model.rb
acts_as_favoritor-2.1.1 lib/generators/templates/model.rb
acts_as_favoritor-2.1.0 lib/generators/templates/model.rb