This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ThinkingSphinx::Index.define :question, with: :active_record, delta: true do | |
#fields | |
indexes title, sortable: true | |
indexes body | |
indexes user.username, as: :author, sortable: true | |
#attributes | |
has created_at, updated_at, votes_sum | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Question < ActiveRecord::Base | |
include Votable | |
default_scope { order(created_at: :desc) } | |
belongs_to :user | |
has_many :answers, dependent: :destroy | |
has_many :attachments, as: :attachable, dependent: :destroy | |
has_many :comments, as: :commentable, dependent: :destroy |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Crash Report log information -------------------------------------------- | |
See Crash Report log file under the one of following: | |
* ~/Library/Logs/CrashReporter | |
* /Library/Logs/CrashReporter | |
* ~/Library/Logs/DiagnosticReports | |
* /Library/Logs/DiagnosticReports | |
for more details. | |
-- Control frame information ----------------------------------------------- | |
c:0025 p:-17578920525412 s:0096 e:000095 TOP [FINISH] |
NewerOlder