Sha256: decca1fd613d472dec01789d18cc11412c50c611161dc9d8e6785becf6b3e017

Contents?: true

Size: 285 Bytes

Versions: 13

Compression:

Stored size: 285 Bytes

Contents

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

  attr_accessible :title, :type, :location_id, :body, :blog

	def self.default_scope
		order(:title)
  end

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

Version data entries

13 entries across 13 versions & 2 rubygems

Version Path
sunspot_rails-2.3.0 spec/rails_app/app/models/post_with_default_scope.rb
sunspot_rails-2.2.8 spec/rails_app/app/models/post_with_default_scope.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/sunspot_rails-2.2.7/spec/rails_template/app/models/post_with_default_scope.rb
sunspot_rails-2.2.7 spec/rails_template/app/models/post_with_default_scope.rb
sunspot_rails-2.2.6 spec/rails_template/app/models/post_with_default_scope.rb
sunspot_rails-2.2.5 spec/rails_template/app/models/post_with_default_scope.rb
sunspot_rails-2.2.4 spec/rails_template/app/models/post_with_default_scope.rb
sunspot_rails-2.2.3 spec/rails_template/app/models/post_with_default_scope.rb
sunspot_rails-2.2.2 spec/rails_template/app/models/post_with_default_scope.rb
sunspot_rails-2.2.1 spec/rails_template/app/models/post_with_default_scope.rb
sunspot_rails-2.2.0 spec/rails_template/app/models/post_with_default_scope.rb
sunspot_rails-2.1.1 spec/rails_template/app/models/post_with_default_scope.rb
sunspot_rails-2.1.0 spec/rails_template/app/models/post_with_default_scope.rb