Sha256: 3284ff9c369a0f3d1e833e35546bc6cecc2df6a4c2c75ef40eacfebf1dd85c1a

Contents?: true

Size: 247 Bytes

Versions: 11

Compression:

Stored size: 247 Bytes

Contents

# frozen_string_literal: true

class Favorite < ApplicationRecord
  extend ActsAsFavoritor::FavoriteScopes

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

  def block!
    update!(blocked: true)
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
acts_as_favoritor-6.0.2 lib/generators/templates/model.rb
acts_as_favoritor-6.0.1 lib/generators/templates/model.rb
acts_as_favoritor-6.0.0 lib/generators/templates/model.rb
acts_as_favoritor-5.0.3 lib/generators/templates/model.rb
acts_as_favoritor-5.0.2 lib/generators/templates/model.rb
acts_as_favoritor-5.0.1 lib/generators/templates/model.rb
acts_as_favoritor-5.0.0 lib/generators/templates/model.rb
acts_as_favoritor-4.0.3 lib/generators/templates/model.rb
acts_as_favoritor-4.0.2 lib/generators/templates/model.rb
acts_as_favoritor-4.0.1 lib/generators/templates/model.rb
acts_as_favoritor-4.0.0 lib/generators/templates/model.rb