Sha256: bc39b08b191a1e9bd2f01eb7d0c377be7ed71cc679cbca9065acba0ff290d426

Contents?: true

Size: 1005 Bytes

Versions: 2

Compression:

Stored size: 1005 Bytes

Contents

class CurrentRevision
  def uuid
    42
  end

  def user_id
    42
  end

  def file_size
    42
  end

  def file_content_type
    "42/42"
  end

  def state
    "42"
  end
end

class Folder
  def room_id
    42
  end
end

class Document < ActiveRecord::Base
  belongs_to :current_revision

  def folder
    Folder.new
  end

  def current_revision
    CurrentRevision.new
  end

  searchable do
    integer  :id
    integer  :folder_id
    integer  :room_id           do folder.room_id end

    text     :name              # fulltext
    string   :name              # order_by
    suggestion :name            # Suggestion (autocompletion)
    time     :updated_at

    integer  :uuid              do current_revision.uuid end
    integer  :user_id           do current_revision.user_id end
    integer  :file_size         do current_revision.file_size end
    string   :file_content_type do current_revision.file_content_type end
    string   :state             do current_revision.state end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
oss_active_record-0.3.1 test/dummy/app/models/document.rb
oss_active_record-0.3.0 test/dummy/app/models/document.rb