Skip to content

Commit

Permalink
use display_name_translations in Library
Browse files Browse the repository at this point in the history
  • Loading branch information
nabeta committed May 29, 2021
1 parent 04a056f commit a9c566d
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 30 deletions.
1 change: 1 addition & 0 deletions app/models/library.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class Library < ApplicationRecord
extend FriendlyId
friendly_id :name
geocoded_by :address
translates :display_name

searchable do
text :name, :display_name, :note, :address
Expand Down
10 changes: 5 additions & 5 deletions app/models/user_export_file.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@ def export!
#
# Table name: user_export_files
#
# id :integer not null, primary key
# user_id :integer
# id :bigint not null, primary key
# user_id :bigint
# user_export_file_name :string
# user_export_content_type :string
# user_export_file_size :integer
# user_export_file_size :bigint
# user_export_updated_at :datetime
# executed_at :datetime
# created_at :datetime
# updated_at :datetime
# created_at :datetime not null
# updated_at :datetime not null
#
12 changes: 6 additions & 6 deletions app/models/user_import_file.rb
Original file line number Diff line number Diff line change
Expand Up @@ -337,8 +337,8 @@ def set_profile_params(row)
#
# Table name: user_import_files
#
# id :integer not null, primary key
# user_id :integer
# id :bigint not null, primary key
# user_id :bigint
# note :text
# executed_at :datetime
# user_import_file_name :string
Expand All @@ -348,9 +348,9 @@ def set_profile_params(row)
# user_import_fingerprint :string
# edit_mode :string
# error_message :text
# created_at :datetime
# updated_at :datetime
# created_at :datetime not null
# updated_at :datetime not null
# user_encoding :string
# default_library_id :integer
# default_user_group_id :integer
# default_library_id :bigint
# default_user_group_id :bigint
#
8 changes: 4 additions & 4 deletions spec/fixtures/libraries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
library_00001:
name: web
short_display_name: Web
display_name: World Wide Web
display_name_translations: {"en": "World Wide Web", "ja": "ウェブ"}
fax_number:
updated_at: 2007-08-31 00:18:06.662349 +09:00
telephone_number_1:
Expand All @@ -19,7 +19,7 @@ library_00001:
library_00002:
name: kamata
short_display_name: 蒲田
display_name: Kamata Library
display_name_translations: {"en": "Kamata Library", "ja": "蒲田図書館"}
fax_number: ""
updated_at: 2007-08-31 00:18:06.662349 +09:00
telephone_number_1: 81-3-3732-5111
Expand All @@ -37,7 +37,7 @@ library_00002:
library_00003:
name: hachioji
short_display_name: 八王子
display_name: Hachioji Library
display_name_translations: {"en": "Hachioji Library", "ja": "八王子図書館"}
fax_number: 042-637-2116
updated_at: 2007-08-31 00:18:16.188285 +09:00
telephone_number_1: 042-637-2033
Expand All @@ -54,7 +54,7 @@ library_00003:
library_00004:
name: mita
short_display_name: 三田
display_name: Mita Library
display_name_translations: {"en": "Mita Library", "ja": "三田図書館"}
fax_number: ""
updated_at: 2007-08-31 00:18:20.043951 +09:00
telephone_number_1: ""
Expand Down
47 changes: 32 additions & 15 deletions spec/fixtures/library_groups.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,37 @@ one:
#
# Table name: library_groups
#
# id :integer not null, primary key
# name :string(255) not null
# display_name :text
# short_name :string(255) not null
# my_networks :text
# login_banner :text
# note :text
# post_to_union_catalog :boolean default(FALSE), not null
# country_id :integer
# created_at :datetime
# updated_at :datetime
# admin_networks :text
# allow_bookmark_external_url :boolean default(FALSE), not null
# position :integer
# url :string(255) default("http://localhost:3000/")
# id :bigint not null, primary key
# name :string not null
# display_name :text
# short_name :string not null
# my_networks :text
# login_banner :text
# note :text
# country_id :integer
# position :integer
# created_at :datetime not null
# updated_at :datetime not null
# admin_networks :text
# allow_bookmark_external_url :boolean default(FALSE), not null
# url :string default("http://localhost:3000/")
# settings :text
# html_snippet :text
# book_jacket_source :string
# max_number_of_results :integer default(1000)
# family_name_first :boolean default(TRUE)
# screenshot_generator :string
# pub_year_facet_range_interval :integer default(10)
# user_id :bigint
# csv_charset_conversion :boolean default(FALSE), not null
# header_logo_file_name :string
# header_logo_content_type :string
# header_logo_file_size :bigint
# header_logo_updated_at :datetime
# header_logo_meta :text
# display_name_translations :jsonb not null
# login_banner_translations :jsonb not null
# footer_banner_translations :jsonb not null
# email :string
#

1 change: 1 addition & 0 deletions spec/fixtures/shelves.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ shelf_00004:
#
# id :bigint not null, primary key
# name :string not null
# display_name :text
# note :text
# library_id :bigint not null
# items_count :integer default(0), not null
Expand Down

0 comments on commit a9c566d

Please sign in to comment.