Skip to content

Commit 2d2cfbc

Browse files
committed
Annotate models
Including as a separate commit, as it touches multiple files.
1 parent fd9a731 commit 2d2cfbc

File tree

8 files changed

+47
-28
lines changed

8 files changed

+47
-28
lines changed

app/models/metrics/algorithms.rb

-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
# suggested_resource_exact :integer
1818
# lcsh :integer
1919
# citation :integer
20-
# barcode :integer
2120
#
2221
module Metrics
2322
# Algorithms aggregates statistics for matches for all SearchEvents

app/models/suggested_resource.rb

+10
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# frozen_string_literal: true
22

3+
# == Schema Information
4+
#
5+
# Table name: suggested_resources
6+
#
7+
# id :integer not null, primary key
8+
# title :string
9+
# url :string
10+
# created_at :datetime not null
11+
# updated_at :datetime not null
12+
#
313
# SuggestedResource stores custom hints that we want to send to the
414
# user in response to specific strings. For example, a search for "web of
515
# science" should be met with our custom login link to Web of Science via MIT.

app/models/term.rb

+7-6
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,13 @@
77
#
88
# Table name: terms
99
#
10-
# id :integer not null, primary key
11-
# phrase :string
12-
# created_at :datetime not null
13-
# updated_at :datetime not null
14-
# flag :boolean
15-
# fingerprint_id :integer
10+
# id :integer not null, primary key
11+
# phrase :string
12+
# created_at :datetime not null
13+
# updated_at :datetime not null
14+
# flag :boolean
15+
# fingerprint_id :integer
16+
# suggested_resource_id :integer
1617
#
1718
class Term < ApplicationRecord
1819
has_many :search_events, dependent: :destroy

test/fixtures/suggested_resources.yml

+6-8
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
# == Schema Information
22
#
3-
# Table name: detector_suggested_resources
3+
# Table name: suggested_resources
44
#
5-
# id :integer not null, primary key
6-
# title :string
7-
# url :string
8-
# phrase :string
9-
# fingerprint :string
10-
# created_at :datetime not null
11-
# updated_at :datetime not null
5+
# id :integer not null, primary key
6+
# title :string
7+
# url :string
8+
# created_at :datetime not null
9+
# updated_at :datetime not null
1210
#
1311

1412

test/fixtures/terms.yml

+7-6
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22
#
33
# Table name: terms
44
#
5-
# id :integer not null, primary key
6-
# phrase :string
7-
# created_at :datetime not null
8-
# updated_at :datetime not null
9-
# flag :boolean
10-
# fingerprint_id :integer
5+
# id :integer not null, primary key
6+
# phrase :string
7+
# created_at :datetime not null
8+
# updated_at :datetime not null
9+
# flag :boolean
10+
# fingerprint_id :integer
11+
# suggested_resource_id :integer
1112
#
1213

1314
cool:

test/models/metrics/algorithms_test.rb

-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
# suggested_resource_exact :integer
1818
# lcsh :integer
1919
# citation :integer
20-
# barcode :integer
2120
#
2221
require 'test_helper'
2322

test/models/suggested_resource_test.rb

+10
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# frozen_string_literal: true
22

3+
# == Schema Information
4+
#
5+
# Table name: suggested_resources
6+
#
7+
# id :integer not null, primary key
8+
# title :string
9+
# url :string
10+
# created_at :datetime not null
11+
# updated_at :datetime not null
12+
#
313
require 'test_helper'
414

515
class SuggestedResourceTest < ActiveSupport::TestCase

test/models/term_test.rb

+7-6
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@
44
#
55
# Table name: terms
66
#
7-
# id :integer not null, primary key
8-
# phrase :string
9-
# created_at :datetime not null
10-
# updated_at :datetime not null
11-
# flag :boolean
12-
# fingerprint_id :integer
7+
# id :integer not null, primary key
8+
# phrase :string
9+
# created_at :datetime not null
10+
# updated_at :datetime not null
11+
# flag :boolean
12+
# fingerprint_id :integer
13+
# suggested_resource_id :integer
1314
#
1415
require 'test_helper'
1516

0 commit comments

Comments
 (0)