Sha256: 4f8a58a618a78c45f96c295c7f23225ef65853f96bd0ff6a73b78160efb8f568

Contents?: true

Size: 249 Bytes

Versions: 9

Compression:

Stored size: 249 Bytes

Contents

# frozen_string_literal: true

class User < ActiveRecord::Base
  has_many :articles

  ThinkingSphinx::Callbacks.append(self, :behaviours => [:sql])

  default_scope { order(:id) }
  scope :recent, lambda { where('created_at > ?', 1.week.ago) }
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
thinking-sphinx-5.6.0 spec/internal/app/models/user.rb
thinking-sphinx-5.5.1 spec/internal/app/models/user.rb
thinking-sphinx-5.5.0 spec/internal/app/models/user.rb
thinking-sphinx-5.4.0 spec/internal/app/models/user.rb
thinking-sphinx-5.3.0 spec/internal/app/models/user.rb
thinking-sphinx-5.2.1 spec/internal/app/models/user.rb
thinking-sphinx-5.2.0 spec/internal/app/models/user.rb
thinking-sphinx-5.1.0 spec/internal/app/models/user.rb
thinking-sphinx-5.0.0 spec/internal/app/models/user.rb