Sha256: 58ec1a55e2b1c570e6e79d1c7ec96719429cc0aa22ca2bd2382d83e56f70d3b3

Contents?: true

Size: 285 Bytes

Versions: 1

Compression:

Stored size: 285 Bytes

Contents

# frozen_string_literal: true

class Favorite < ApplicationRecord
  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

1 entries across 1 versions & 1 rubygems

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