Sha256: 1528d9ca1b6b8add13daf16d6b74b0a4bbad300b507aead0c2cd0805c5a57534

Contents?: true

Size: 307 Bytes

Versions: 3

Compression:

Stored size: 307 Bytes

Contents

module FriendlyId
  # A FriendlyId slug stored in an external table.
  #
  # @see FriendlyId::History
  class Slug < ActiveRecord::Base
    belongs_to :sluggable, polymorphic: true

    def sluggable
      sluggable_type.constantize.unscoped { super }
    end

    def to_param
      slug
    end
  end
end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/friendly_id-5.5.1/lib/friendly_id/slug.rb
friendly_id-5.5.1 lib/friendly_id/slug.rb
friendly_id-5.5.0 lib/friendly_id/slug.rb