Sha256: b5bf194619145714812ada3896e4958da55894e94146edab349cdd3622119096

Contents?: true

Size: 272 Bytes

Versions: 7

Compression:

Stored size: 272 Bytes

Contents

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

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

  default_scope :order => :title

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

Version data entries

7 entries across 7 versions & 3 rubygems

Version Path
sunspot_rails-2.0.0 spec/rails_template/app/models/post_with_default_scope.rb
sunspot_rails-2.0.0.pre.130115 spec/rails_template/app/models/post_with_default_scope.rb
sunspot_rails-2.0.0.pre.120925 spec/rails_template/app/models/post_with_default_scope.rb
sunspot_solr-2.0.0.pre.120924 sunspot_rails/spec/rails_template/app/models/post_with_default_scope.rb
sunspot_rails-2.0.0.pre.120924 sunspot_rails/spec/rails_template/app/models/post_with_default_scope.rb
sunspot-2.0.0.pre.120924 sunspot_rails/spec/rails_template/app/models/post_with_default_scope.rb
sunspot_rails-2.0.0.pre.120720 spec/rails_template/app/models/post_with_default_scope.rb