Sha256: 668a3832373bcd2946025b552345d6fd4d5537668d1f44bc3944817d1592685f

Contents?: true

Size: 224 Bytes

Versions: 5

Compression:

Stored size: 224 Bytes

Contents

class PostWithDefaultScope < ActiveRecord::Base
  def self.table_name
    'posts'
  end

	def self.default_scope
		order(:title)
  end

  searchable :auto_index => false, :auto_remove => false do
    string :title
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
sunspot_rails-2.7.1 spec/rails_app/app/models/post_with_default_scope.rb
sunspot_rails-2.7.0 spec/rails_app/app/models/post_with_default_scope.rb
sunspot_rails-2.6.0 spec/rails_app/app/models/post_with_default_scope.rb
sunspot_rails-2.5.0 spec/rails_app/app/models/post_with_default_scope.rb
sunspot_rails-2.4.0 spec/rails_app/app/models/post_with_default_scope.rb