Sha256: 56a10f456b231205be641c36a9475daab27e427dc960b89b573f5861d16f89cd

Contents?: true

Size: 372 Bytes

Versions: 7

Compression:

Stored size: 372 Bytes

Contents

class Post < ActiveRecord::Base
  belongs_to :location
  belongs_to :author
  has_many :comments

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

  searchable :auto_index => false, :auto_remove => false do
    string :title
    text :body, :more_like_this => true
    location :location
  end

  scope :includes_location, -> {
    includes(:location)
  }
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
sunspot_rails-2.3.0 spec/rails_app/app/models/post.rb
sunspot_rails-2.2.8 spec/rails_app/app/models/post.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/sunspot_rails-2.2.7/spec/rails_template/app/models/post.rb
sunspot_rails-2.2.7 spec/rails_template/app/models/post.rb
sunspot_rails-2.2.6 spec/rails_template/app/models/post.rb
sunspot_rails-2.2.5 spec/rails_template/app/models/post.rb
sunspot_rails-2.2.4 spec/rails_template/app/models/post.rb