diff --git a/.idea/sample_app.iml b/.idea/sample_app.iml index 9c3fe17..68be5e7 100644 --- a/.idea/sample_app.iml +++ b/.idea/sample_app.iml @@ -141,62 +141,76 @@ diff --git a/Gemfile b/Gemfile index 222716a..9e9fc6a 100644 --- a/Gemfile +++ b/Gemfile @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # current gem file source 'https://rubygems.org' ruby '3.2.2' @@ -84,5 +86,5 @@ group :production do gem 'mysql2' # gem 'activerecord-mysql2-adapter' end -#upload: validation, file format, and etc... +# upload: validation, file format, and etc... gem 'active_storage_validations', '~> 0.9.2' diff --git a/Rakefile b/Rakefile index 9a5ea73..488c551 100644 --- a/Rakefile +++ b/Rakefile @@ -1,6 +1,8 @@ +# frozen_string_literal: true + # Add your own tasks in files placed in lib/tasks ending in .rake, # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. -require_relative "config/application" +require_relative 'config/application' Rails.application.load_tasks diff --git a/app/channels/application_cable/channel.rb b/app/channels/application_cable/channel.rb index d672697..9aec230 100644 --- a/app/channels/application_cable/channel.rb +++ b/app/channels/application_cable/channel.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module ApplicationCable class Channel < ActionCable::Channel::Base end diff --git a/app/channels/application_cable/connection.rb b/app/channels/application_cable/connection.rb index 0ff5442..8d6c2a1 100644 --- a/app/channels/application_cable/connection.rb +++ b/app/channels/application_cable/connection.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module ApplicationCable class Connection < ActionCable::Connection::Base end diff --git a/app/controllers/account_activations_controller.rb b/app/controllers/account_activations_controller.rb index 7dd315f..0717999 100644 --- a/app/controllers/account_activations_controller.rb +++ b/app/controllers/account_activations_controller.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + # account activations controller : handle account activations class AccountActivationsController < ApplicationController before_action :logged_in_user, except: [:edit] diff --git a/app/controllers/accreditation_school_lists_controller.rb b/app/controllers/accreditation_school_lists_controller.rb index b0bbc81..dccc418 100644 --- a/app/controllers/accreditation_school_lists_controller.rb +++ b/app/controllers/accreditation_school_lists_controller.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + # accreditation controller : handle accreditation class AccreditationSchoolListsController < ApplicationController before_action :set_accreditation_school_list, only: %i[show edit update destroy] diff --git a/app/controllers/achievement_kategori_lists_controller.rb b/app/controllers/achievement_kategori_lists_controller.rb index 8edce65..6ab92a7 100644 --- a/app/controllers/achievement_kategori_lists_controller.rb +++ b/app/controllers/achievement_kategori_lists_controller.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + # achievement kategori list controller : handle achievement kategori list class AchievementKategoriListsController < ApplicationController before_action :set_achievement_kategori_list, only: %i[show edit update destroy] diff --git a/app/controllers/achievement_tingkat_lists_controller.rb b/app/controllers/achievement_tingkat_lists_controller.rb index 5972604..f71d6d6 100644 --- a/app/controllers/achievement_tingkat_lists_controller.rb +++ b/app/controllers/achievement_tingkat_lists_controller.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + # achievement tingkat list controller : handle achievement tingkat list class AchievementTingkatListsController < ApplicationController before_action :set_achievement_tingkat_list, only: %i[show edit update destroy] diff --git a/app/controllers/achievements_controller.rb b/app/controllers/achievements_controller.rb index 4040448..b67507c 100644 --- a/app/controllers/achievements_controller.rb +++ b/app/controllers/achievements_controller.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + # achievements controller : handle achievements class AchievementsController < ApplicationController before_action :set_achievement_dropdown_menu, only: %i[new create edit update] diff --git a/app/controllers/address_kabupaten_lists_controller.rb b/app/controllers/address_kabupaten_lists_controller.rb index 11e5a3f..76695df 100644 --- a/app/controllers/address_kabupaten_lists_controller.rb +++ b/app/controllers/address_kabupaten_lists_controller.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + # address kabupaten list controller : handle address kabupaten list class AddressKabupatenListsController < ApplicationController before_action :set_address_kabupaten_list, only: %i[show edit update destroy] diff --git a/app/controllers/address_kecamatan_lists_controller.rb b/app/controllers/address_kecamatan_lists_controller.rb index 1a897d3..d566fbc 100644 --- a/app/controllers/address_kecamatan_lists_controller.rb +++ b/app/controllers/address_kecamatan_lists_controller.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + # adress kecamatan list controller : handle address kecamatan list class AddressKecamatanListsController < ApplicationController before_action :set_address_kecamatan_list, only: %i[show edit update destroy] diff --git a/app/controllers/address_province_lists_controller.rb b/app/controllers/address_province_lists_controller.rb index 41576e6..0b47173 100644 --- a/app/controllers/address_province_lists_controller.rb +++ b/app/controllers/address_province_lists_controller.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + # address province list controller : handle address province list class AddressProvinceListsController < ApplicationController before_action :set_address_province_list, only: %i[show edit update destroy] diff --git a/app/controllers/addresses_controller.rb b/app/controllers/addresses_controller.rb index b4c2328..da9ce04 100644 --- a/app/controllers/addresses_controller.rb +++ b/app/controllers/addresses_controller.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + # address controller : handle address class AddressesController < ApplicationController before_action :set_address_dropdown_menu, only: %i[new create edit update] diff --git a/app/controllers/all_school_lists_controller.rb b/app/controllers/all_school_lists_controller.rb index 7ff5f07..3760f66 100644 --- a/app/controllers/all_school_lists_controller.rb +++ b/app/controllers/all_school_lists_controller.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + # all school list controller : handle all school list class AllSchoolListsController < ApplicationController before_action :set_all_school_list, only: %i[show edit update destroy] diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 6650e1d..3da7ed5 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + # application controller : handle application class ApplicationController < ActionController::Base before_action :logged_in_user # prevent to write before_action :logged_in_user in every controller diff --git a/app/controllers/batch_lists_controller.rb b/app/controllers/batch_lists_controller.rb index 208543a..738a3e9 100644 --- a/app/controllers/batch_lists_controller.rb +++ b/app/controllers/batch_lists_controller.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + # batch list controller : handle batch list class BatchListsController < ApplicationController before_action :set_batch_list, only: %i[show edit update destroy] diff --git a/app/controllers/extra_lists_controller.rb b/app/controllers/extra_lists_controller.rb index 99aa9fe..3a9d167 100644 --- a/app/controllers/extra_lists_controller.rb +++ b/app/controllers/extra_lists_controller.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + # extra list controller : handle extra list class ExtraListsController < ApplicationController before_action :set_extra_list, only: %i[show edit update destroy] diff --git a/app/controllers/extras_controller.rb b/app/controllers/extras_controller.rb index 6047b3c..0829640 100644 --- a/app/controllers/extras_controller.rb +++ b/app/controllers/extras_controller.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + # extra controller : handle extra class ExtrasController < ApplicationController before_action :set_extra_dropdown_menu, only: %i[new create edit update] diff --git a/app/controllers/high_school_majors_controller.rb b/app/controllers/high_school_majors_controller.rb index ebc659a..2d49df2 100644 --- a/app/controllers/high_school_majors_controller.rb +++ b/app/controllers/high_school_majors_controller.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + # high school major controller : handle high school major class HighSchoolMajorsController < ApplicationController before_action :set_high_school_major, only: %i[show edit update destroy] diff --git a/app/controllers/language_degree_lists_controller.rb b/app/controllers/language_degree_lists_controller.rb index 9ebea42..13bbbf3 100644 --- a/app/controllers/language_degree_lists_controller.rb +++ b/app/controllers/language_degree_lists_controller.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + # language degree list controller : handle language degree list class LanguageDegreeListsController < ApplicationController before_action :set_language_degree_list, only: %i[show edit update destroy] diff --git a/app/controllers/language_name_lists_controller.rb b/app/controllers/language_name_lists_controller.rb index c493094..a178c65 100644 --- a/app/controllers/language_name_lists_controller.rb +++ b/app/controllers/language_name_lists_controller.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + # language name list controller : handle language name list class LanguageNameListsController < ApplicationController before_action :set_language_name_list, only: %i[show edit update destroy] diff --git a/app/controllers/languages_controller.rb b/app/controllers/languages_controller.rb index 0487e8c..837c729 100644 --- a/app/controllers/languages_controller.rb +++ b/app/controllers/languages_controller.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + # language controller : handle language class LanguagesController < ApplicationController before_action :set_language_dropdown_menu, only: %i[new create edit update] diff --git a/app/controllers/major_lists_controller.rb b/app/controllers/major_lists_controller.rb index 00a850a..bb84514 100644 --- a/app/controllers/major_lists_controller.rb +++ b/app/controllers/major_lists_controller.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + # major list controller : handle major list class MajorListsController < ApplicationController before_action :set_major_list, only: %i[show edit update destroy] diff --git a/app/controllers/majors_controller.rb b/app/controllers/majors_controller.rb index c350ed1..fea4e1f 100644 --- a/app/controllers/majors_controller.rb +++ b/app/controllers/majors_controller.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + # major controller : handle major class MajorsController < ApplicationController before_action :set_major_dropdown_menu, only: %i[new create edit update] diff --git a/app/controllers/microposts_controller.rb b/app/controllers/microposts_controller.rb index af33dcd..a7ff242 100644 --- a/app/controllers/microposts_controller.rb +++ b/app/controllers/microposts_controller.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + # microposts controller : handle microposts class MicropostsController < ApplicationController # only login user could create and destroy it's post diff --git a/app/controllers/organization_degree_lists_controller.rb b/app/controllers/organization_degree_lists_controller.rb index 1b66b8c..db22d20 100644 --- a/app/controllers/organization_degree_lists_controller.rb +++ b/app/controllers/organization_degree_lists_controller.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + # organization degree list controller : handle organization degree list class OrganizationDegreeListsController < ApplicationController before_action :set_organization_degree_list, only: %i[show edit update destroy] diff --git a/app/controllers/organizations_controller.rb b/app/controllers/organizations_controller.rb index cf073d6..18c42fd 100644 --- a/app/controllers/organizations_controller.rb +++ b/app/controllers/organizations_controller.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + # organization controller : handle organization class OrganizationsController < ApplicationController before_action :set_organization_dropdown_menu, only: %i[new create edit update] @@ -49,5 +50,4 @@ def current_organization @organization = current_user.organizations.find_by(id: params[:id]) redirect_to root_url if @organization.nil? end - end diff --git a/app/controllers/parent_education_lists_controller.rb b/app/controllers/parent_education_lists_controller.rb index 292a5f3..52feb0a 100644 --- a/app/controllers/parent_education_lists_controller.rb +++ b/app/controllers/parent_education_lists_controller.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + # parent education list controller : handle parent education list class ParentEducationListsController < ApplicationController before_action :set_parent_education_list, only: %i[show edit update destroy] diff --git a/app/controllers/parent_job_lists_controller.rb b/app/controllers/parent_job_lists_controller.rb index a522ca8..db576cb 100644 --- a/app/controllers/parent_job_lists_controller.rb +++ b/app/controllers/parent_job_lists_controller.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + # parent job list controller : handle parent job list class ParentJobListsController < ApplicationController before_action :set_parent_job_list, only: %i[show edit update destroy] diff --git a/app/controllers/parents_controller.rb b/app/controllers/parents_controller.rb index 29597fe..f9ee86f 100644 --- a/app/controllers/parents_controller.rb +++ b/app/controllers/parents_controller.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + # parents controller : handle parents data class ParentsController < ApplicationController before_action :set_parent_dropdown_menu, only: %i[new create edit update] diff --git a/app/controllers/password_resets_controller.rb b/app/controllers/password_resets_controller.rb index 02ee077..80636bd 100644 --- a/app/controllers/password_resets_controller.rb +++ b/app/controllers/password_resets_controller.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + # password reset controller : handle password reset class PasswordResetsController < ApplicationController # Because confirmation of the existence of a valid @user diff --git a/app/controllers/personal_gender_lists_controller.rb b/app/controllers/personal_gender_lists_controller.rb index 1b62f41..381fede 100644 --- a/app/controllers/personal_gender_lists_controller.rb +++ b/app/controllers/personal_gender_lists_controller.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + # personal religion list controller : handle personal religion list class PersonalGenderListsController < ApplicationController before_action :set_personal_gender_list, only: %i[show edit update destroy] diff --git a/app/controllers/personal_religion_lists_controller.rb b/app/controllers/personal_religion_lists_controller.rb index 91af6d8..ded19d4 100644 --- a/app/controllers/personal_religion_lists_controller.rb +++ b/app/controllers/personal_religion_lists_controller.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + # personal religion list controller : handle personal religion list class PersonalReligionListsController < ApplicationController before_action :set_personal_religion_list, only: %i[show edit update destroy] diff --git a/app/controllers/personals_controller.rb b/app/controllers/personals_controller.rb index cf574b3..c96ff1c 100644 --- a/app/controllers/personals_controller.rb +++ b/app/controllers/personals_controller.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + # personal controller : handle personal data class PersonalsController < ApplicationController before_action :set_personal_dropdown_menu, only: %i[new create edit update] diff --git a/app/controllers/pmdk_each_score_informations_controller.rb b/app/controllers/pmdk_each_score_informations_controller.rb index 7b5ca78..300440b 100644 --- a/app/controllers/pmdk_each_score_informations_controller.rb +++ b/app/controllers/pmdk_each_score_informations_controller.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + # pmdk each score controller : handle pmdk each score class PmdkEachScoreInformationsController < ApplicationController before_action :current_pmdk_each_score, only: %i[show edit update] diff --git a/app/controllers/pmdk_school_lists_controller.rb b/app/controllers/pmdk_school_lists_controller.rb index 2e06617..61e6d41 100644 --- a/app/controllers/pmdk_school_lists_controller.rb +++ b/app/controllers/pmdk_school_lists_controller.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + # pmdk school list controller : handle pmdk school list class PmdkSchoolListsController < ApplicationController before_action :set_pmdk_school_list, only: %i[show edit update destroy] diff --git a/app/controllers/pmdk_total_score_informations_controller.rb b/app/controllers/pmdk_total_score_informations_controller.rb index 0a984e7..9d25c5a 100644 --- a/app/controllers/pmdk_total_score_informations_controller.rb +++ b/app/controllers/pmdk_total_score_informations_controller.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + # pmdk total score controller : handle pmdk total score class PmdkTotalScoreInformationsController < ApplicationController before_action :current_pmdk_total_score, only: %i[edit update show] diff --git a/app/controllers/sessions_controller.rb b/app/controllers/sessions_controller.rb index bcbc059..d0c4098 100644 --- a/app/controllers/sessions_controller.rb +++ b/app/controllers/sessions_controller.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + # handle sessions (login, logout, etc.) for the application class SessionsController < ApplicationController skip_before_action :logged_in_user, only: %i[new create] # skip the logged_in_user method for new and create action diff --git a/app/controllers/source_information_lists_controller.rb b/app/controllers/source_information_lists_controller.rb index bbd6485..a5163c0 100644 --- a/app/controllers/source_information_lists_controller.rb +++ b/app/controllers/source_information_lists_controller.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + # source information list controller : handle source information list class SourceInformationListsController < ApplicationController before_action :set_source_information_list, only: %i[show edit update destroy] diff --git a/app/controllers/source_motivation_lists_controller.rb b/app/controllers/source_motivation_lists_controller.rb index c5e1610..60e7135 100644 --- a/app/controllers/source_motivation_lists_controller.rb +++ b/app/controllers/source_motivation_lists_controller.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + # source motivation list controller : handle source motivation list class SourceMotivationListsController < ApplicationController before_action :set_source_motivation_list, only: %i[show edit update destroy] diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index c916304..66a2556 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + # users controller : handle users class UsersController < ApplicationController # prevent use update data or delete without login first diff --git a/app/controllers/usm_school_informations_controller.rb b/app/controllers/usm_school_informations_controller.rb index a26b988..769706b 100644 --- a/app/controllers/usm_school_informations_controller.rb +++ b/app/controllers/usm_school_informations_controller.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + # usm school information controller : handle usm school information class UsmSchoolInformationsController < ApplicationController before_action :set_usm_school_dropdown, only: %i[new create edit update] diff --git a/app/controllers/utbk_scores_controller.rb b/app/controllers/utbk_scores_controller.rb index 6b1ecba..2c012b5 100644 --- a/app/controllers/utbk_scores_controller.rb +++ b/app/controllers/utbk_scores_controller.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + # utbk_score : handle utbk score data class UtbkScoresController < ApplicationController before_action :current_utbk, only: %i[edit update show] diff --git a/app/helpers/account_activations_helper.rb b/app/helpers/account_activations_helper.rb index c4d5ac7..f54f32f 100644 --- a/app/helpers/account_activations_helper.rb +++ b/app/helpers/account_activations_helper.rb @@ -1,2 +1,4 @@ +# frozen_string_literal: true + module AccountActivationsHelper end diff --git a/app/helpers/accreditation_school_lists_helper.rb b/app/helpers/accreditation_school_lists_helper.rb index cc4ecc1..182c7f1 100644 --- a/app/helpers/accreditation_school_lists_helper.rb +++ b/app/helpers/accreditation_school_lists_helper.rb @@ -1,2 +1,4 @@ +# frozen_string_literal: true + module AccreditationSchoolListsHelper end diff --git a/app/helpers/achievement_kategori_lists_helper.rb b/app/helpers/achievement_kategori_lists_helper.rb index a97aedb..bd89e52 100644 --- a/app/helpers/achievement_kategori_lists_helper.rb +++ b/app/helpers/achievement_kategori_lists_helper.rb @@ -1,2 +1,4 @@ +# frozen_string_literal: true + module AchievementKategoriListsHelper end diff --git a/app/helpers/achievement_tingkat_lists_helper.rb b/app/helpers/achievement_tingkat_lists_helper.rb index a808770..90c7d87 100644 --- a/app/helpers/achievement_tingkat_lists_helper.rb +++ b/app/helpers/achievement_tingkat_lists_helper.rb @@ -1,2 +1,4 @@ +# frozen_string_literal: true + module AchievementTingkatListsHelper end diff --git a/app/helpers/achievements_helper.rb b/app/helpers/achievements_helper.rb index 26cc28c..a17ca8c 100644 --- a/app/helpers/achievements_helper.rb +++ b/app/helpers/achievements_helper.rb @@ -1,2 +1,4 @@ +# frozen_string_literal: true + module AchievementsHelper end diff --git a/app/helpers/address_kabupaten_lists_helper.rb b/app/helpers/address_kabupaten_lists_helper.rb index 58f9101..06d4c20 100644 --- a/app/helpers/address_kabupaten_lists_helper.rb +++ b/app/helpers/address_kabupaten_lists_helper.rb @@ -1,2 +1,4 @@ +# frozen_string_literal: true + module AddressKabupatenListsHelper end diff --git a/app/helpers/address_kecamatan_lists_helper.rb b/app/helpers/address_kecamatan_lists_helper.rb index f83e714..ff3ee6d 100644 --- a/app/helpers/address_kecamatan_lists_helper.rb +++ b/app/helpers/address_kecamatan_lists_helper.rb @@ -1,2 +1,4 @@ +# frozen_string_literal: true + module AddressKecamatanListsHelper end diff --git a/app/helpers/address_province_lists_helper.rb b/app/helpers/address_province_lists_helper.rb index 766b7ea..b2887e6 100644 --- a/app/helpers/address_province_lists_helper.rb +++ b/app/helpers/address_province_lists_helper.rb @@ -1,2 +1,4 @@ +# frozen_string_literal: true + module AddressProvinceListsHelper end diff --git a/app/helpers/addresses_helper.rb b/app/helpers/addresses_helper.rb index 5f4dc13..405a28d 100644 --- a/app/helpers/addresses_helper.rb +++ b/app/helpers/addresses_helper.rb @@ -1,2 +1,4 @@ +# frozen_string_literal: true + module AddressesHelper end diff --git a/app/helpers/all_school_lists_helper.rb b/app/helpers/all_school_lists_helper.rb index 1c9761a..69d23af 100644 --- a/app/helpers/all_school_lists_helper.rb +++ b/app/helpers/all_school_lists_helper.rb @@ -1,2 +1,4 @@ +# frozen_string_literal: true + module AllSchoolListsHelper end diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index de6be79..15b06f0 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1,2 +1,4 @@ +# frozen_string_literal: true + module ApplicationHelper end diff --git a/app/helpers/batch_lists_helper.rb b/app/helpers/batch_lists_helper.rb index b3df7c3..4f3ef7a 100644 --- a/app/helpers/batch_lists_helper.rb +++ b/app/helpers/batch_lists_helper.rb @@ -1,2 +1,4 @@ +# frozen_string_literal: true + module BatchListsHelper end diff --git a/app/helpers/extra_lists_helper.rb b/app/helpers/extra_lists_helper.rb index cd116f6..1888cb2 100644 --- a/app/helpers/extra_lists_helper.rb +++ b/app/helpers/extra_lists_helper.rb @@ -1,2 +1,4 @@ +# frozen_string_literal: true + module ExtraListsHelper end diff --git a/app/helpers/extras_helper.rb b/app/helpers/extras_helper.rb index f38feca..7367d26 100644 --- a/app/helpers/extras_helper.rb +++ b/app/helpers/extras_helper.rb @@ -1,2 +1,4 @@ +# frozen_string_literal: true + module ExtrasHelper end diff --git a/app/helpers/high_school_majors_helper.rb b/app/helpers/high_school_majors_helper.rb index 7f26803..65ad733 100644 --- a/app/helpers/high_school_majors_helper.rb +++ b/app/helpers/high_school_majors_helper.rb @@ -1,2 +1,4 @@ +# frozen_string_literal: true + module HighSchoolMajorsHelper end diff --git a/app/helpers/language_degree_lists_helper.rb b/app/helpers/language_degree_lists_helper.rb index bd70eba..81a0da9 100644 --- a/app/helpers/language_degree_lists_helper.rb +++ b/app/helpers/language_degree_lists_helper.rb @@ -1,2 +1,4 @@ +# frozen_string_literal: true + module LanguageDegreeListsHelper end diff --git a/app/helpers/language_name_lists_helper.rb b/app/helpers/language_name_lists_helper.rb index 761c8db..fec1794 100644 --- a/app/helpers/language_name_lists_helper.rb +++ b/app/helpers/language_name_lists_helper.rb @@ -1,2 +1,4 @@ +# frozen_string_literal: true + module LanguageNameListsHelper end diff --git a/app/helpers/languages_helper.rb b/app/helpers/languages_helper.rb index 2468668..48f5f06 100644 --- a/app/helpers/languages_helper.rb +++ b/app/helpers/languages_helper.rb @@ -1,2 +1,4 @@ +# frozen_string_literal: true + module LanguagesHelper end diff --git a/app/helpers/major_lists_helper.rb b/app/helpers/major_lists_helper.rb index 2636263..5f1943f 100644 --- a/app/helpers/major_lists_helper.rb +++ b/app/helpers/major_lists_helper.rb @@ -1,2 +1,4 @@ +# frozen_string_literal: true + module MajorListsHelper end diff --git a/app/helpers/majors_helper.rb b/app/helpers/majors_helper.rb index c1881b4..3049f41 100644 --- a/app/helpers/majors_helper.rb +++ b/app/helpers/majors_helper.rb @@ -1,2 +1,4 @@ +# frozen_string_literal: true + module MajorsHelper end diff --git a/app/helpers/microposts_helper.rb b/app/helpers/microposts_helper.rb index f08aad2..68bf642 100644 --- a/app/helpers/microposts_helper.rb +++ b/app/helpers/microposts_helper.rb @@ -1,2 +1,4 @@ +# frozen_string_literal: true + module MicropostsHelper end diff --git a/app/helpers/organization_degree_lists_helper.rb b/app/helpers/organization_degree_lists_helper.rb index d111d24..a5dbbec 100644 --- a/app/helpers/organization_degree_lists_helper.rb +++ b/app/helpers/organization_degree_lists_helper.rb @@ -1,2 +1,4 @@ +# frozen_string_literal: true + module OrganizationDegreeListsHelper end diff --git a/app/helpers/organizations_helper.rb b/app/helpers/organizations_helper.rb index 24cc9a8..6fdbbb5 100644 --- a/app/helpers/organizations_helper.rb +++ b/app/helpers/organizations_helper.rb @@ -1,2 +1,4 @@ +# frozen_string_literal: true + module OrganizationsHelper end diff --git a/app/helpers/parent_education_lists_helper.rb b/app/helpers/parent_education_lists_helper.rb index c2fe936..69dd988 100644 --- a/app/helpers/parent_education_lists_helper.rb +++ b/app/helpers/parent_education_lists_helper.rb @@ -1,2 +1,4 @@ +# frozen_string_literal: true + module ParentEducationListsHelper end diff --git a/app/helpers/parent_job_lists_helper.rb b/app/helpers/parent_job_lists_helper.rb index 372e916..592ee68 100644 --- a/app/helpers/parent_job_lists_helper.rb +++ b/app/helpers/parent_job_lists_helper.rb @@ -1,2 +1,4 @@ +# frozen_string_literal: true + module ParentJobListsHelper end diff --git a/app/helpers/parents_helper.rb b/app/helpers/parents_helper.rb index 2b0361c..a6894f6 100644 --- a/app/helpers/parents_helper.rb +++ b/app/helpers/parents_helper.rb @@ -1,2 +1,4 @@ +# frozen_string_literal: true + module ParentsHelper end diff --git a/app/helpers/password_resets_helper.rb b/app/helpers/password_resets_helper.rb index 0c9d96e..b1b36d9 100644 --- a/app/helpers/password_resets_helper.rb +++ b/app/helpers/password_resets_helper.rb @@ -1,2 +1,4 @@ +# frozen_string_literal: true + module PasswordResetsHelper end diff --git a/app/helpers/personal_gender_lists_helper.rb b/app/helpers/personal_gender_lists_helper.rb index db03f8f..2ebbe2a 100644 --- a/app/helpers/personal_gender_lists_helper.rb +++ b/app/helpers/personal_gender_lists_helper.rb @@ -1,2 +1,4 @@ +# frozen_string_literal: true + module PersonalGenderListsHelper end diff --git a/app/helpers/personal_helper.rb b/app/helpers/personal_helper.rb index 1b5c250..a3e2796 100644 --- a/app/helpers/personal_helper.rb +++ b/app/helpers/personal_helper.rb @@ -1,2 +1,4 @@ +# frozen_string_literal: true + module PersonalHelper end diff --git a/app/helpers/personal_religion_lists_helper.rb b/app/helpers/personal_religion_lists_helper.rb index 2bc7aea..bf03e7a 100644 --- a/app/helpers/personal_religion_lists_helper.rb +++ b/app/helpers/personal_religion_lists_helper.rb @@ -1,2 +1,4 @@ +# frozen_string_literal: true + module PersonalReligionListsHelper end diff --git a/app/helpers/pmdk_each_score_informations_helper.rb b/app/helpers/pmdk_each_score_informations_helper.rb index d65b3e6..ad4091d 100644 --- a/app/helpers/pmdk_each_score_informations_helper.rb +++ b/app/helpers/pmdk_each_score_informations_helper.rb @@ -1,2 +1,4 @@ +# frozen_string_literal: true + module PmdkEachScoreInformationsHelper end diff --git a/app/helpers/pmdk_school_informations_helper.rb b/app/helpers/pmdk_school_informations_helper.rb index da8d758..2d229d8 100644 --- a/app/helpers/pmdk_school_informations_helper.rb +++ b/app/helpers/pmdk_school_informations_helper.rb @@ -1,2 +1,4 @@ +# frozen_string_literal: true + module PmdkSchoolInformationsHelper end diff --git a/app/helpers/pmdk_school_lists_helper.rb b/app/helpers/pmdk_school_lists_helper.rb index 8f0580f..f94ebbc 100644 --- a/app/helpers/pmdk_school_lists_helper.rb +++ b/app/helpers/pmdk_school_lists_helper.rb @@ -1,2 +1,4 @@ +# frozen_string_literal: true + module PmdkSchoolListsHelper end diff --git a/app/helpers/pmdk_total_score_informations_helper.rb b/app/helpers/pmdk_total_score_informations_helper.rb index ad43cbc..01c6656 100644 --- a/app/helpers/pmdk_total_score_informations_helper.rb +++ b/app/helpers/pmdk_total_score_informations_helper.rb @@ -1,2 +1,4 @@ +# frozen_string_literal: true + module PmdkTotalScoreInformationsHelper end diff --git a/app/helpers/source_information_lists_helper.rb b/app/helpers/source_information_lists_helper.rb index 56309fe..3973309 100644 --- a/app/helpers/source_information_lists_helper.rb +++ b/app/helpers/source_information_lists_helper.rb @@ -1,2 +1,4 @@ +# frozen_string_literal: true + module SourceInformationListsHelper end diff --git a/app/helpers/source_motivation_lists_helper.rb b/app/helpers/source_motivation_lists_helper.rb index 5942fd5..8a0eb3d 100644 --- a/app/helpers/source_motivation_lists_helper.rb +++ b/app/helpers/source_motivation_lists_helper.rb @@ -1,2 +1,4 @@ +# frozen_string_literal: true + module SourceMotivationListsHelper end diff --git a/app/helpers/sources_helper.rb b/app/helpers/sources_helper.rb index c2433ba..2380294 100644 --- a/app/helpers/sources_helper.rb +++ b/app/helpers/sources_helper.rb @@ -1,2 +1,4 @@ +# frozen_string_literal: true + module SourcesHelper end diff --git a/app/helpers/static_pages_helper.rb b/app/helpers/static_pages_helper.rb index 2d63e79..97d8549 100644 --- a/app/helpers/static_pages_helper.rb +++ b/app/helpers/static_pages_helper.rb @@ -1,2 +1,4 @@ +# frozen_string_literal: true + module StaticPagesHelper end diff --git a/app/helpers/users_helper.rb b/app/helpers/users_helper.rb index 432d9e7..5001e8c 100644 --- a/app/helpers/users_helper.rb +++ b/app/helpers/users_helper.rb @@ -1,8 +1,10 @@ +# frozen_string_literal: true + module UsersHelper - #gravatar_for : return the Gravatar for the given user. + # gravatar_for : return the Gravatar for the given user. def gravatar_for(user) - gravatar_id = Digest::MD5::hexdigest(user.email.downcase) + gravatar_id = Digest::MD5.hexdigest(user.email.downcase) gravatar_url = "https://secure.gravatar.com/avatar/#{gravatar_id}" - image_tag(gravatar_url, alt: user.name, class: "gravatar") + image_tag(gravatar_url, alt: user.name, class: 'gravatar') end end diff --git a/app/helpers/usm_school_informations_helper.rb b/app/helpers/usm_school_informations_helper.rb index d7092c1..6fc21b4 100644 --- a/app/helpers/usm_school_informations_helper.rb +++ b/app/helpers/usm_school_informations_helper.rb @@ -1,2 +1,4 @@ +# frozen_string_literal: true + module UsmSchoolInformationsHelper end diff --git a/app/helpers/utbk_school_informations_helper.rb b/app/helpers/utbk_school_informations_helper.rb index fc651c1..3fce0cd 100644 --- a/app/helpers/utbk_school_informations_helper.rb +++ b/app/helpers/utbk_school_informations_helper.rb @@ -1,2 +1,4 @@ +# frozen_string_literal: true + module UtbkSchoolInformationsHelper end diff --git a/app/helpers/utbk_scores_helper.rb b/app/helpers/utbk_scores_helper.rb index e6ddd53..2a0d0c4 100644 --- a/app/helpers/utbk_scores_helper.rb +++ b/app/helpers/utbk_scores_helper.rb @@ -1,2 +1,4 @@ +# frozen_string_literal: true + module UtbkScoresHelper end diff --git a/app/jobs/application_job.rb b/app/jobs/application_job.rb index d394c3d..bef3959 100644 --- a/app/jobs/application_job.rb +++ b/app/jobs/application_job.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class ApplicationJob < ActiveJob::Base # Automatically retry jobs that encountered a deadlock # retry_on ActiveRecord::Deadlocked diff --git a/app/mailers/application_mailer.rb b/app/mailers/application_mailer.rb index 3c34c81..d84cb6e 100644 --- a/app/mailers/application_mailer.rb +++ b/app/mailers/application_mailer.rb @@ -1,4 +1,6 @@ +# frozen_string_literal: true + class ApplicationMailer < ActionMailer::Base - default from: "from@example.com" - layout "mailer" + default from: 'from@example.com' + layout 'mailer' end diff --git a/app/mailers/user_mailer.rb b/app/mailers/user_mailer.rb index e8f1c44..4ae259e 100644 --- a/app/mailers/user_mailer.rb +++ b/app/mailers/user_mailer.rb @@ -1,14 +1,15 @@ -class UserMailer < ApplicationMailer +# frozen_string_literal: true +class UserMailer < ApplicationMailer # Subject can be set in your I18n file at config/locales/en.yml # with the following lookup: # # en.user_mailer.account_activation.subject # def account_activation(user) - @greeting = "Hi" + @greeting = 'Hi' @user = user - mail to: user.email, subject: "Account activation" + mail to: user.email, subject: 'Account activation' end # Subject can be set in your I18n file at config/locales/en.yml @@ -17,8 +18,8 @@ def account_activation(user) # en.user_mailer.password_reset.subject # def password_reset(user) - @greeting = "Hi" + @greeting = 'Hi' @user = user - mail to: user.email, subject: "Password reset" + mail to: user.email, subject: 'Password reset' end end diff --git a/app/models/accreditation_school_list.rb b/app/models/accreditation_school_list.rb index 8bdd6c9..eb4a427 100644 --- a/app/models/accreditation_school_list.rb +++ b/app/models/accreditation_school_list.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + # accreditation school list model : handle accreditation school list class AccreditationSchoolList < ApplicationRecord validates :akreditasi, presence: true, length: { diff --git a/app/models/achievement.rb b/app/models/achievement.rb index 345d1f2..468b717 100644 --- a/app/models/achievement.rb +++ b/app/models/achievement.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + # achievement model : handle achievement class Achievement < ApplicationRecord belongs_to :user diff --git a/app/models/achievement_kategori_list.rb b/app/models/achievement_kategori_list.rb index a9c4da3..79aa84c 100644 --- a/app/models/achievement_kategori_list.rb +++ b/app/models/achievement_kategori_list.rb @@ -1,4 +1,6 @@ +# frozen_string_literal: true + # achievements kategori list model class AchievementKategoriList < ApplicationRecord - validates :kategori, presence: true, length: {minimum: 4, maximum: 15}, uniqueness: true + validates :kategori, presence: true, length: { minimum: 4, maximum: 15 }, uniqueness: true end diff --git a/app/models/achievement_tingkat_list.rb b/app/models/achievement_tingkat_list.rb index d496350..ca69a4d 100644 --- a/app/models/achievement_tingkat_list.rb +++ b/app/models/achievement_tingkat_list.rb @@ -1,4 +1,6 @@ +# frozen_string_literal: true + # achievement_tingkat_list model : handle achievement_tingkat_list class AchievementTingkatList < ApplicationRecord - validates :tingkat, presence: true, length: {minimum: 4, maximum: 15}, uniqueness: true + validates :tingkat, presence: true, length: { minimum: 4, maximum: 15 }, uniqueness: true end diff --git a/app/models/address.rb b/app/models/address.rb index 41314b8..1c5a27b 100644 --- a/app/models/address.rb +++ b/app/models/address.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # address model : handle address class Address < ApplicationRecord belongs_to :user diff --git a/app/models/address_kabupaten_list.rb b/app/models/address_kabupaten_list.rb index d36a1ad..0bd986a 100644 --- a/app/models/address_kabupaten_list.rb +++ b/app/models/address_kabupaten_list.rb @@ -1,7 +1,9 @@ +# frozen_string_literal: true + # address_kabupaten_list model : handle address_kabupaten_list class AddressKabupatenList < ApplicationRecord has_many :address_kecamatan_lists, dependent: :destroy validates :kabupaten, presence: true, uniqueness: true, - length: { minimum: 3, maximum: 35 } + length: { minimum: 3, maximum: 35 } validates :address_province_list_id, presence: true end diff --git a/app/models/address_kecamatan_list.rb b/app/models/address_kecamatan_list.rb index f06e0a2..c22ddc4 100644 --- a/app/models/address_kecamatan_list.rb +++ b/app/models/address_kecamatan_list.rb @@ -1,7 +1,9 @@ +# frozen_string_literal: true + # address_kecamatan_list model : handle address_kecamatan_list class AddressKecamatanList < ApplicationRecord belongs_to :address_kabupaten_list validates :kecamatan, presence: true, uniqueness: true, - length: { minimum: 3, maximum: 35 } + length: { minimum: 3, maximum: 35 } validates :address_kabupaten_list_id, presence: true end diff --git a/app/models/address_province_list.rb b/app/models/address_province_list.rb index cef0940..7f73fa3 100644 --- a/app/models/address_province_list.rb +++ b/app/models/address_province_list.rb @@ -1,6 +1,8 @@ +# frozen_string_literal: true + # address_province_list model : handle address_province_list class AddressProvinceList < ApplicationRecord has_many :address_kabupaten_lists, dependent: :destroy validates :provinsi, presence: true, uniqueness: true, - length: { minimum: 3, maximum: 35 } + length: { minimum: 3, maximum: 35 } end diff --git a/app/models/all_school_list.rb b/app/models/all_school_list.rb index 3adae59..7a5ba9f 100644 --- a/app/models/all_school_list.rb +++ b/app/models/all_school_list.rb @@ -1,5 +1,7 @@ +# frozen_string_literal: true + # model all_school_list : handle all_school_list class AllSchoolList < ApplicationRecord validates :sekolah, presence: true, - length: {minimum: 5, maximum: 35}, uniqueness: true + length: { minimum: 5, maximum: 35 }, uniqueness: true end diff --git a/app/models/application_record.rb b/app/models/application_record.rb index c135ff3..adb8ddf 100644 --- a/app/models/application_record.rb +++ b/app/models/application_record.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # model application_record : handle application_record class ApplicationRecord < ActiveRecord::Base primary_abstract_class diff --git a/app/models/batch_list.rb b/app/models/batch_list.rb index edc472e..acfd315 100644 --- a/app/models/batch_list.rb +++ b/app/models/batch_list.rb @@ -1,10 +1,14 @@ +# frozen_string_literal: true + # model batch_list : handle batch_list class BatchList < ApplicationRecord - validates :gelombang, presence: true, length: {minimum: 4, maximum: 25}, uniqueness: true - #aktif must boolean + validates :gelombang, presence: true, length: { minimum: 4, maximum: 25 }, uniqueness: true + # aktif must boolean validate :aktif_is_boolean + private + def aktif_is_boolean - errors.add(:aktif, "must be boolean") unless [true, false].include? aktif + errors.add(:aktif, 'must be boolean') unless [true, false].include? aktif end end diff --git a/app/models/cost.rb b/app/models/cost.rb index f8409a4..c2bd4be 100644 --- a/app/models/cost.rb +++ b/app/models/cost.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # model cost : handle cost class Cost < ApplicationRecord end diff --git a/app/models/cost_list.rb b/app/models/cost_list.rb index 2a6d141..d894bf4 100644 --- a/app/models/cost_list.rb +++ b/app/models/cost_list.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # model cost_list : handle cost_list class CostList < ApplicationRecord end diff --git a/app/models/cost_vourcher_list.rb b/app/models/cost_vourcher_list.rb index 39ca287..1aee202 100644 --- a/app/models/cost_vourcher_list.rb +++ b/app/models/cost_vourcher_list.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # costVoucherList model : handle cost_voucher_list class CostVourcherList < ApplicationRecord end diff --git a/app/models/extra.rb b/app/models/extra.rb index 579e544..02309e4 100644 --- a/app/models/extra.rb +++ b/app/models/extra.rb @@ -1,8 +1,10 @@ +# frozen_string_literal: true + # extra model : handle extra class Extra < ApplicationRecord belongs_to :user - validates :nama_kegiatan, length: {minimum: 4, maximum: 20} - validates :predikat, length: {minimum: 4, maximum: 20} - validates :mulai, length: {minimum: 4, maximum: 20} - validates :berakhir, length: {minimum: 4, maximum: 20} + validates :nama_kegiatan, length: { minimum: 4, maximum: 20 } + validates :predikat, length: { minimum: 4, maximum: 20 } + validates :mulai, length: { minimum: 4, maximum: 20 } + validates :berakhir, length: { minimum: 4, maximum: 20 } end diff --git a/app/models/extra_list.rb b/app/models/extra_list.rb index 9e2f81a..c01a630 100644 --- a/app/models/extra_list.rb +++ b/app/models/extra_list.rb @@ -1,4 +1,6 @@ +# frozen_string_literal: true + # extra_list model : handle extra_list class ExtraList < ApplicationRecord - validates :predikat, presence: true, length: {minimum: 4, maximum: 15}, uniqueness: true + validates :predikat, presence: true, length: { minimum: 4, maximum: 15 }, uniqueness: true end diff --git a/app/models/high_school_major.rb b/app/models/high_school_major.rb index 30ab48c..4a04596 100644 --- a/app/models/high_school_major.rb +++ b/app/models/high_school_major.rb @@ -1,4 +1,6 @@ +# frozen_string_literal: true + # high school major model : handle high_school_major class HighSchoolMajor < ApplicationRecord - validates :jurusan, presence: true, length: {minimum: 3, maximum:25}, uniqueness: true + validates :jurusan, presence: true, length: { minimum: 3, maximum: 25 }, uniqueness: true end diff --git a/app/models/language.rb b/app/models/language.rb index 426f682..3b23ac1 100644 --- a/app/models/language.rb +++ b/app/models/language.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # language model : handle language class Language < ApplicationRecord belongs_to :user diff --git a/app/models/language_degree_list.rb b/app/models/language_degree_list.rb index 4a3d616..83bf645 100644 --- a/app/models/language_degree_list.rb +++ b/app/models/language_degree_list.rb @@ -1,4 +1,6 @@ +# frozen_string_literal: true + # model language_degree_list : handle language_degree_list class LanguageDegreeList < ApplicationRecord - validates :tingkat, presence: true, length: {minimum: 4, maximum: 15} + validates :tingkat, presence: true, length: { minimum: 4, maximum: 15 } end diff --git a/app/models/language_name_list.rb b/app/models/language_name_list.rb index 8c61837..36bd8e3 100644 --- a/app/models/language_name_list.rb +++ b/app/models/language_name_list.rb @@ -1,4 +1,6 @@ +# frozen_string_literal: true + # model language_name_list : handle language_name_list class LanguageNameList < ApplicationRecord - validates :bahasa, presence: true, length: {minimum: 4, maximum: 15}, uniqueness: true + validates :bahasa, presence: true, length: { minimum: 4, maximum: 15 }, uniqueness: true end diff --git a/app/models/major.rb b/app/models/major.rb index d008c87..71dd20b 100644 --- a/app/models/major.rb +++ b/app/models/major.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # model major : handle major class Major < ApplicationRecord belongs_to :user @@ -5,26 +7,29 @@ class Major < ApplicationRecord validates :jurusan_2, presence: true, length: { minimum: 4, maximum: 30 } validates :jurusan_3, presence: true, length: { minimum: 4, maximum: 30 } validates :gelombang, presence: true, length: { minimum: 4, maximum: 30 } - #each jurusan_1 is different from jurusan_2 and jurusan_3 + # each jurusan_1 is different from jurusan_2 and jurusan_3 # each jurusan_2 is different from jurusan_3 validate :jurusan_1_not_equal_jurusan_2 validate :jurusan_1_not_equal_jurusan_3 validate :jurusan_2_not_equal_jurusan_3 private - def jurusan_1_not_equal_jurusan_2 - if jurusan_1 == jurusan_2 - errors.add(:jurusan_1, "can't be equal to jurusan_2") - end - end - def jurusan_1_not_equal_jurusan_3 - if jurusan_1 == jurusan_3 - errors.add(:jurusan_1, "can't be equal to jurusan_3") - end - end - def jurusan_2_not_equal_jurusan_3 - if jurusan_2 == jurusan_3 - errors.add(:jurusan_2, "can't be equal to jurusan_3") - end - end + + def jurusan_1_not_equal_jurusan_2 + return unless jurusan_1 == jurusan_2 + + errors.add(:jurusan_1, "can't be equal to jurusan_2") + end + + def jurusan_1_not_equal_jurusan_3 + return unless jurusan_1 == jurusan_3 + + errors.add(:jurusan_1, "can't be equal to jurusan_3") + end + + def jurusan_2_not_equal_jurusan_3 + return unless jurusan_2 == jurusan_3 + + errors.add(:jurusan_2, "can't be equal to jurusan_3") + end end diff --git a/app/models/major_list.rb b/app/models/major_list.rb index 9215bcf..fb74e35 100644 --- a/app/models/major_list.rb +++ b/app/models/major_list.rb @@ -1,4 +1,6 @@ +# frozen_string_literal: true + # model major_list : handle major_list class MajorList < ApplicationRecord - validates :jurusan, presence:true, length: {minimum: 4, maximum: 30}, uniqueness: true + validates :jurusan, presence: true, length: { minimum: 4, maximum: 30 }, uniqueness: true end diff --git a/app/models/micropost.rb b/app/models/micropost.rb index e1bda7d..23afe15 100644 --- a/app/models/micropost.rb +++ b/app/models/micropost.rb @@ -1,11 +1,13 @@ +# frozen_string_literal: true + # micropost model : handle micropost class Micropost < ApplicationRecord - belongs_to :user #user_id - #change the behavior, make the last inserted post come first - default_scope -> {order(created_at: :desc)} #using lambda function -> + belongs_to :user # user_id + # change the behavior, make the last inserted post come first + default_scope -> { order(created_at: :desc) } # using lambda function -> validates :user_id, presence: true - validates :content, presence: true, length: {maximum: 140} - #associated an upload file with micropost model - has_one_attached :image #using active storage api - validates :image, content_type: [:png, :jpg, :jpeg], size: {less_than: 1.megabytes} + validates :content, presence: true, length: { maximum: 140 } + # associated an upload file with micropost model + has_one_attached :image # using active storage api + validates :image, content_type: %i[png jpg jpeg], size: { less_than: 1.megabytes } end diff --git a/app/models/organization.rb b/app/models/organization.rb index a08968d..ac2c1cc 100644 --- a/app/models/organization.rb +++ b/app/models/organization.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # organization model : handle organization class Organization < ApplicationRecord belongs_to :user diff --git a/app/models/organization_degree_list.rb b/app/models/organization_degree_list.rb index 0f12e44..bab4ceb 100644 --- a/app/models/organization_degree_list.rb +++ b/app/models/organization_degree_list.rb @@ -1,4 +1,6 @@ +# frozen_string_literal: true + # organization_degree_list model : handle organization_degree_list class OrganizationDegreeList < ApplicationRecord - validates :jabatan, presence: true, length: {minimum: 3, maximum: 15}, uniqueness: true + validates :jabatan, presence: true, length: { minimum: 3, maximum: 15 }, uniqueness: true end diff --git a/app/models/parent.rb b/app/models/parent.rb index 523c8c3..8fd20c8 100644 --- a/app/models/parent.rb +++ b/app/models/parent.rb @@ -1,10 +1,12 @@ +# frozen_string_literal: true + # model parent : handle parent class Parent < ApplicationRecord belongs_to :user - validates :nama_ayah,:nama_ibu, presence: true, length: { minimum: 4, maximum: 25 } + validates :nama_ayah, :nama_ibu, presence: true, length: { minimum: 4, maximum: 25 } # validates :nama_ibu, presence: true, length: { minimum: 4, maximum: 25 } - validates :nik_ayah,:nik_ibu, length: { minimum: 16, maximum: 16 }, - allow_nil: true + validates :nik_ayah, :nik_ibu, length: { minimum: 16, maximum: 16 }, + allow_nil: true # validates :nik_ibu, presence: true, length: { minimum: 16, maximum: 16 } validates :pendidikan_ayah, presence: true, length: { minimum: 2, maximum: 20 } validates :pendidikan_ibu, presence: true, length: { minimum: 2, maximum: 20 } diff --git a/app/models/parent_education_list.rb b/app/models/parent_education_list.rb index a957b98..5e40b59 100644 --- a/app/models/parent_education_list.rb +++ b/app/models/parent_education_list.rb @@ -1,4 +1,6 @@ +# frozen_string_literal: true + # model parent_education_list : handle parent_education_list class ParentEducationList < ApplicationRecord - validates :pendidikan, presence: true, length: {minimum: 2, maximum: 20}, uniqueness: true + validates :pendidikan, presence: true, length: { minimum: 2, maximum: 20 }, uniqueness: true end diff --git a/app/models/parent_job_list.rb b/app/models/parent_job_list.rb index 714b1db..a888228 100644 --- a/app/models/parent_job_list.rb +++ b/app/models/parent_job_list.rb @@ -1,4 +1,6 @@ +# frozen_string_literal: true + # parent_job_list model : handle parent_job_list class ParentJobList < ApplicationRecord - validates :pekerjaan, presence: true, length: {minimum: 3, maximum: 25}, uniqueness: true + validates :pekerjaan, presence: true, length: { minimum: 3, maximum: 25 }, uniqueness: true end diff --git a/app/models/personal.rb b/app/models/personal.rb index 60ea00a..ac3b985 100644 --- a/app/models/personal.rb +++ b/app/models/personal.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + # personal model : handle personal class Personal < ApplicationRecord belongs_to :user diff --git a/app/models/personal_gender_list.rb b/app/models/personal_gender_list.rb index 7505256..061b66b 100644 --- a/app/models/personal_gender_list.rb +++ b/app/models/personal_gender_list.rb @@ -1,4 +1,6 @@ +# frozen_string_literal: true + # personal_gender_list model class PersonalGenderList < ApplicationRecord - validates :jenis_kelamin, presence: true, length: {minimum: 4, maximum: 10}, uniqueness: true + validates :jenis_kelamin, presence: true, length: { minimum: 4, maximum: 10 }, uniqueness: true end diff --git a/app/models/personal_religion_list.rb b/app/models/personal_religion_list.rb index 2e03916..7545e5b 100644 --- a/app/models/personal_religion_list.rb +++ b/app/models/personal_religion_list.rb @@ -1,4 +1,6 @@ +# frozen_string_literal: true + # model PersonalReligionList : handle personal_religion_list class PersonalReligionList < ApplicationRecord - validates :agama, presence: true, length: {minimum: 4, maximum: 20}, uniqueness: true + validates :agama, presence: true, length: { minimum: 4, maximum: 20 }, uniqueness: true end diff --git a/app/models/pmdk_each_score_information.rb b/app/models/pmdk_each_score_information.rb index f6f31a6..b19aef4 100644 --- a/app/models/pmdk_each_score_information.rb +++ b/app/models/pmdk_each_score_information.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # model pmdk_each_score_information : handle pmdk_each_score_information class PmdkEachScoreInformation < ApplicationRecord belongs_to :user @@ -6,7 +8,7 @@ class PmdkEachScoreInformation < ApplicationRecord :kimia_semester_5, :fisika_semester_1, :fisika_semester_2, :fisika_semester_3, :fisika_semester_4, :fisika_semester_5, :bahasa_inggris_semester_1, :bahasa_inggris_semester_2, :bahasa_inggris_semester_3, :bahasa_inggris_semester_4, :bahasa_inggris_semester_5, presence: true, - numericality: {only_integer: false, greater_than_or_equal_to: 2, less_than_or_equal_to: 100} + numericality: { only_integer: false, greater_than_or_equal_to: 2, less_than_or_equal_to: 100 } has_one_attached :sertifikat - validates :sertifikat, content_type: [:pdf], size: {less_than: 1.megabytes} + validates :sertifikat, content_type: [:pdf], size: { less_than: 1.megabytes } end diff --git a/app/models/pmdk_school_information.rb b/app/models/pmdk_school_information.rb index 024aef9..fbbc2fa 100644 --- a/app/models/pmdk_school_information.rb +++ b/app/models/pmdk_school_information.rb @@ -1,9 +1,11 @@ +# frozen_string_literal: true + # model pmdk_school_information : handle pmdk_school_information class PmdkSchoolInformation < ApplicationRecord belongs_to :user - validates :jurusan_sekolah, presence: true, length: {minimum: 3, maximum: 50} - validates :asal_sekolah, presence: true, length: {minimum: 3, maximum: 50} - validates :akreditas, presence: true, length: {minimum: 1, maximum: 20} + validates :jurusan_sekolah, presence: true, length: { minimum: 3, maximum: 50 } + validates :asal_sekolah, presence: true, length: { minimum: 3, maximum: 50 } + validates :akreditas, presence: true, length: { minimum: 1, maximum: 20 } validates :jumlah_nilai_un, presence: false, numericality: { greater_than_or_equal_to: 2, less_than_or_equal_to: 1000 }, allow_nil: true @@ -12,5 +14,5 @@ class PmdkSchoolInformation < ApplicationRecord less_than_or_equal_to: 10 }, allow_nil: true has_one_attached :nilai_rapor - validates :nilai_rapor, content_type: [:pdf], size: {less_than: 1.megabytes} + validates :nilai_rapor, content_type: [:pdf], size: { less_than: 1.megabytes } end diff --git a/app/models/pmdk_school_list.rb b/app/models/pmdk_school_list.rb index 75ec802..819a7d5 100644 --- a/app/models/pmdk_school_list.rb +++ b/app/models/pmdk_school_list.rb @@ -1,5 +1,7 @@ +# frozen_string_literal: true + # model pmdk_school_list : handle pmdk_school_list class PmdkSchoolList < ApplicationRecord validates :sekolah, presence: true, - length: {minimum: 5, maximum: 35}, uniqueness: true + length: { minimum: 5, maximum: 35 }, uniqueness: true end diff --git a/app/models/pmdk_total_score_information.rb b/app/models/pmdk_total_score_information.rb index b691de9..00aff4b 100644 --- a/app/models/pmdk_total_score_information.rb +++ b/app/models/pmdk_total_score_information.rb @@ -1,12 +1,14 @@ +# frozen_string_literal: true + # model PmdkTotalScoreInformation : handle pmdk_total_score_information class PmdkTotalScoreInformation < ApplicationRecord belongs_to :user validates :jumlah_nilai_semester_1, :jumlah_nilai_semester_2, :jumlah_nilai_semester_3, :jumlah_nilai_semester_4, :jumlah_nilai_semester_5, presence: true, - numericality: {only_integer: false, greater_than_or_equal_to: 2, less_than_or_equal_to: 3000} + numericality: { only_integer: false, greater_than_or_equal_to: 2, less_than_or_equal_to: 3000 } validates :jumlah_pelajaran_semester_1, :jumlah_pelajaran_semester_2, :jumlah_pelajaran_semester_3, :jumlah_pelajaran_semester_4, :jumlah_pelajaran_semester_5, presence: true, - numericality: {only_integer: true, greater_than_or_equal_to: 2, less_than_or_equal_to: 30} + numericality: { only_integer: true, greater_than_or_equal_to: 2, less_than_or_equal_to: 30 } has_one_attached :surat_rekomendasi - validates :surat_rekomendasi, content_type: [:pdf], size: {less_than: 1.megabytes} + validates :surat_rekomendasi, content_type: [:pdf], size: { less_than: 1.megabytes } end diff --git a/app/models/relationship.rb b/app/models/relationship.rb index f37a9a1..684860f 100644 --- a/app/models/relationship.rb +++ b/app/models/relationship.rb @@ -1,8 +1,10 @@ +# frozen_string_literal: true + # model Relationship : handle relationship class Relationship < ApplicationRecord - #association of follower and followed - belongs_to :follower, class_name: 'User' #follower_id - belongs_to :followed, class_name: 'User' #followed_id + # association of follower and followed + belongs_to :follower, class_name: 'User' # follower_id + belongs_to :followed, class_name: 'User' # followed_id validates :followed_id, presence: true validates :follower_id, presence: true end diff --git a/app/models/source.rb b/app/models/source.rb index ca42301..d4b2f82 100644 --- a/app/models/source.rb +++ b/app/models/source.rb @@ -1,8 +1,11 @@ +# frozen_string_literal: true + # model Source : handle source class Source < ApplicationRecord belongs_to :user validates :motivasi, presence: true, length: { minimum: 4, maximum: 30 } validates :sumber_informasi, presence: true, length: { minimum: 4, maximum: 30 } - #jumlah_n is integer and between 1-50 - validates :jumlah_n, presence: true, numericality: {only_integer: true, greater_than_or_equal_to: 1, less_than_or_equal_to: 50} + # jumlah_n is integer and between 1-50 + validates :jumlah_n, presence: true, + numericality: { only_integer: true, greater_than_or_equal_to: 1, less_than_or_equal_to: 50 } end diff --git a/app/models/source_information_list.rb b/app/models/source_information_list.rb index 1bb4e28..6148ab8 100644 --- a/app/models/source_information_list.rb +++ b/app/models/source_information_list.rb @@ -1,4 +1,6 @@ +# frozen_string_literal: true + # model SourceInformationList : handle source_information_list class SourceInformationList < ApplicationRecord - validates :informasi, presence: true, length: {minimum: 4, maximum: 25}, uniqueness: true + validates :informasi, presence: true, length: { minimum: 4, maximum: 25 }, uniqueness: true end diff --git a/app/models/source_motivation_list.rb b/app/models/source_motivation_list.rb index 69097b3..79e11f0 100644 --- a/app/models/source_motivation_list.rb +++ b/app/models/source_motivation_list.rb @@ -1,4 +1,6 @@ +# frozen_string_literal: true + # model SourceMotivationList : handle source_motivation_list class SourceMotivationList < ApplicationRecord - validates :motivasi, presence: true, length: {minimum: 4, maximum: 20}, uniqueness: true + validates :motivasi, presence: true, length: { minimum: 4, maximum: 20 }, uniqueness: true end diff --git a/app/models/user.rb b/app/models/user.rb index 6f739b3..423d183 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -1,22 +1,25 @@ +# frozen_string_literal: true + # model User : handle user class User < ApplicationRecord - #make sure when administrator delete user, it's also delete micropost - has_many :microposts, dependent: :destroy #making relation user and microposts + # make sure when administrator delete user, it's also delete micropost + has_many :microposts, dependent: :destroy # making relation user and microposts has_many :active_relationships, class_name: 'Relationship', - foreign_key: 'follower_id', dependent: :destroy - #using source to tell rails to look for followed_id in active_relationships table + foreign_key: 'follower_id', dependent: :destroy + # using source to tell rails to look for followed_id in active_relationships table has_many :following, through: :active_relationships, source: :followed - #follower: user.follower to go with user.following + # follower: user.follower to go with user.following has_many :passive_relationships, class_name: 'Relationship', - foreign_key: 'followed_id', dependent: :destroy - #using source to tell rails to look for follower_id in passive_relationships table + foreign_key: 'followed_id', dependent: :destroy + # using source to tell rails to look for follower_id in passive_relationships table has_many :followers, through: :passive_relationships, source: :follower - #add destroy: since destroying a user should also destroy that user relationship, add dependent - #example: @user.microposts.build(content: "lorem ipsum") - #create accessible attribute for remember_token - attr_accessor :remember_token, :activation_token, :reset_token #for storage in cookies and token-activation - #transform the email to lowercase - before_save {self.email = email.downcase} + # add destroy: since destroying a user should also destroy that user relationship, add dependent + # example: @user.microposts.build(content: "lorem ipsum") + # create accessible attribute for remember_token + attr_accessor :remember_token, :activation_token, :reset_token # for storage in cookies and token-activation + + # transform the email to lowercase + before_save { self.email = email.downcase } # assign an activation token and digest to each user # before user created, using before_create callback before_create :create_activation_digest @@ -37,95 +40,120 @@ class User < ApplicationRecord has_one :utbk_score, dependent: :destroy has_one :utbk_school_information, dependent: :destroy has_one :usm_school_information - #validates the user input + # validates the user input validates(:name, presence: true) - validates(:name, length: {maximum: 50}) + validates(:name, length: { maximum: 50 }) validates(:email, presence: true) - validates(:email, length: {maximum: 100}) - #email validation using regex - validates(:email, format: {with: /\A[\w+\-.]+@[a-z\d\-.]+\.[a-z]+\z/i}) + validates(:email, length: { maximum: 100 }) + # email validation using regex + validates(:email, format: { with: /\A[\w+\-.]+@[a-z\d\-.]+\.[a-z]+\z/i }) validates(:email, uniqueness: true) validates :email, uniqueness: { case_sensitive: false } - #has_secure_password : generate 2 virtual attributes (password and password_confirmation), + # has_secure_password : generate 2 virtual attributes (password and password_confirmation), # require the presence of the password, require that they match, add an # authenticate method to compare encrypted password to password_digest to authenticate users has_secure_password - #adding rule for password + # adding rule for password validates(:password, presence: true) - validates(:password, length: {minimum: 6}) - #return the hash digest of the given string - def User.digest(string) - #cost : the cost of hashing - cost = ActiveModel::SecurePassword.min_cost ? BCrypt::Engine::MIN_COST : + validates(:password, length: { minimum: 6 }) + # return the hash digest of the given string + def self.digest(string) + # cost : the cost of hashing + cost = if ActiveModel::SecurePassword.min_cost + BCrypt::Engine::MIN_COST + else BCrypt::Engine.cost - #return the hash digest - BCrypt::Password.create(string, cost: cost) + end + # return the hash digest + BCrypt::Password.create(string, cost:) end - #return a random token, as a class method, since we need not use User object - def User.new_token #like static variable + + # return a random token, as a class method, since we need not use User object + # like static variable + def self.new_token SecureRandom.urlsafe_base64 end - #remember: function for dealing with remember stored token + + # remember: function for dealing with remember stored token def remember self.remember_token = User.new_token - #update attribute :remember_digest with new value :remember_token - #and save the record to storage + # update attribute :remember_digest with new value :remember_token + # and save the record to storage update_attribute :remember_digest, User.digest(remember_token) end - #authenticated? : return true if the given token matches the digest - def authenticated?(attribute,token) #generalize version of authenticated - #using send: metaprogramming, we need for activation phases - digest = send("#{attribute}_digest") #using str interpolation - #compare remember_digest with remember_token - return false if digest.nil? #make it not authenticated if in - #one browser already logout but in the other browser still login + + # authenticated? : return true if the given token matches the digest + # generalize version of authenticated + def authenticated?(attribute, token) + # using send: metaprogramming, we need for activation phases + digest = send("#{attribute}_digest") # using str interpolation + # compare remember_digest with remember_token + return false if digest.nil? # make it not authenticated if in + + # one browser already logout but in the other browser still login BCrypt::Password.new(digest).is_password?(token) end - #forget : forget a user, since there is no way to delete the cookies + + # forget : forget a user, since there is no way to delete the cookies def forget update_attribute(:remember_digest, nil) end - #activates an account + + # activates an account def activate update_attribute(:activated, true) update_attribute(:activated_at, Time.zone.now) end - #send activation email + + # send activation email def send_activation_email UserMailer.account_activation(self).deliver_now end - #set the password reset attributes + + # set the password reset attributes def create_reset_digest self.reset_token = User.new_token update_attribute(:reset_digest, User.digest(reset_token)) update_attribute(:reset_sent_at, Time.zone.now) end - #Send password reset email + + # Send password reset email def send_password_reset_email UserMailer.password_reset(self).deliver_now end - #define rule for expired link + + # define rule for expired link def password_reset_expired? - reset_sent_at < 2.hours.ago #make sure link is not exceed 2 hours to validated + reset_sent_at < 2.hours.ago # make sure link is not exceed 2 hours to validated end - def feed #define a proto-feed, - Micropost.where("user_id = ?", id) #show post for current - #logged in user, identify by it's id - #question mark: ensure the id is properly escaped before included in sql query + + # define a proto-feed, + def feed + Micropost.where('user_id = ?', id) # show post for current + # logged in user, identify by it's id + # question mark: ensure the id is properly escaped before included in sql query end - def follow(other_user) #follow a user - following << other_user + + # follow a user + def follow(other_user) + following << other_user end + def unfollow(other_user) - following.delete(other_user) #delete the records supplied from the collection + following.delete(other_user) # delete the records supplied from the collection end - def following?(other_user) #true if the current user is following the other - following.include?(other_user) #include? -> true if given record is present in the collections + + # true if the current user is following the other + def following?(other_user) + following.include?(other_user) # include? -> true if given record is present in the collections end + private - def create_activation_digest #assign activation token - #create the token and digest - self.activation_token = User.new_token #request new token - self.activation_digest = User.digest(activation_token) #hashed the token + + # assign activation token + def create_activation_digest + # create the token and digest + self.activation_token = User.new_token # request new token + self.activation_digest = User.digest(activation_token) # hashed the token end end diff --git a/app/models/usm_school_information.rb b/app/models/usm_school_information.rb index c96a900..ac94a0a 100644 --- a/app/models/usm_school_information.rb +++ b/app/models/usm_school_information.rb @@ -1,9 +1,11 @@ +# frozen_string_literal: true + # model UsmSchoolInformation : handle usm_school_information class UsmSchoolInformation < ApplicationRecord belongs_to :user - validates :jurusan_sekolah, presence: true, length: {minimum: 3, maximum: 50} - validates :asal_sekolah, presence: true, length: {minimum: 3, maximum: 50} - validates :akreditas, presence: true, length: {minimum: 1, maximum: 20} + validates :jurusan_sekolah, presence: true, length: { minimum: 3, maximum: 50 } + validates :asal_sekolah, presence: true, length: { minimum: 3, maximum: 50 } + validates :akreditas, presence: true, length: { minimum: 1, maximum: 20 } validates :jumlah_nilai_un, presence: false, numericality: { only_integer: false, greater_than_or_equal_to: 2, less_than_or_equal_to: 1000 @@ -11,7 +13,7 @@ class UsmSchoolInformation < ApplicationRecord validates :jumlah_pelajaran_un, presence: false, numericality: { only_integer: false, greater_than_or_equal_to: 2, less_than_or_equal_to: 10 - },allow_nil: true + }, allow_nil: true validates :jumlah_pelajaran_semester_5, presence: true, numericality: { only_integer: true, greater_than_or_equal_to: 2, less_than_or_equal_to: 20 diff --git a/app/models/utbk_school_information.rb b/app/models/utbk_school_information.rb index 2f134b6..3e0bb4c 100644 --- a/app/models/utbk_school_information.rb +++ b/app/models/utbk_school_information.rb @@ -1,15 +1,16 @@ +# frozen_string_literal: true + # model UtbkSchoolInformation : handle utbk_school_information class UtbkSchoolInformation < ApplicationRecord belongs_to :user - validates :asal_sekolah, presence: true, length: {minimum: 3, maximum: 50} - validates :jurusan_sekolah, presence: true, length: {minimum: 3, maximum: 50} - validates :akreditas, presence: true, length: {minimum: 1, maximum: 20} + validates :asal_sekolah, presence: true, length: { minimum: 3, maximum: 50 } + validates :jurusan_sekolah, presence: true, length: { minimum: 3, maximum: 50 } + validates :akreditas, presence: true, length: { minimum: 1, maximum: 20 } validates :jumlah_nilai_un, presence: false, numericality: { - greater_than_or_equal_to: 2, less_than_or_equal_to: 1000 + greater_than_or_equal_to: 2, less_than_or_equal_to: 1000 }, allow_nil: true validates :jumlah_pelajaran_un, presence: false, numericality: { only_integer: true, greater_than_or_equal_to: 2, less_than_or_equal_to: 10 }, allow_nil: true - end diff --git a/app/models/utbk_score.rb b/app/models/utbk_score.rb index 2b445ff..09fed8f 100644 --- a/app/models/utbk_score.rb +++ b/app/models/utbk_score.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + # model UtbkScore : handle utbk_score class UtbkScore < ApplicationRecord belongs_to :user diff --git a/app/views/accreditation_school_lists/_accreditation_school_list.json.jbuilder b/app/views/accreditation_school_lists/_accreditation_school_list.json.jbuilder index 728d512..d445fbd 100644 --- a/app/views/accreditation_school_lists/_accreditation_school_list.json.jbuilder +++ b/app/views/accreditation_school_lists/_accreditation_school_list.json.jbuilder @@ -1,2 +1,4 @@ +# frozen_string_literal: true + json.extract! accreditation_school_list, :id, :akreditasi, :created_at, :updated_at json.url accreditation_school_list_url(accreditation_school_list, format: :json) diff --git a/app/views/accreditation_school_lists/index.json.jbuilder b/app/views/accreditation_school_lists/index.json.jbuilder index 3600587..1989670 100644 --- a/app/views/accreditation_school_lists/index.json.jbuilder +++ b/app/views/accreditation_school_lists/index.json.jbuilder @@ -1 +1,4 @@ -json.array! @accreditation_school_lists, partial: "accreditation_school_lists/accreditation_school_list", as: :accreditation_school_list +# frozen_string_literal: true + +json.array! @accreditation_school_lists, partial: 'accreditation_school_lists/accreditation_school_list', + as: :accreditation_school_list diff --git a/app/views/accreditation_school_lists/show.json.jbuilder b/app/views/accreditation_school_lists/show.json.jbuilder index 7bbc583..67529cc 100644 --- a/app/views/accreditation_school_lists/show.json.jbuilder +++ b/app/views/accreditation_school_lists/show.json.jbuilder @@ -1 +1,4 @@ -json.partial! "accreditation_school_lists/accreditation_school_list", accreditation_school_list: @accreditation_school_list +# frozen_string_literal: true + +json.partial! 'accreditation_school_lists/accreditation_school_list', + accreditation_school_list: @accreditation_school_list diff --git a/app/views/achievement_kategori_lists/_achievement_kategori_list.json.jbuilder b/app/views/achievement_kategori_lists/_achievement_kategori_list.json.jbuilder index 196dc99..8165379 100644 --- a/app/views/achievement_kategori_lists/_achievement_kategori_list.json.jbuilder +++ b/app/views/achievement_kategori_lists/_achievement_kategori_list.json.jbuilder @@ -1,2 +1,4 @@ +# frozen_string_literal: true + json.extract! achievement_kategori_list, :id, :kategori, :created_at, :updated_at json.url achievement_kategori_list_url(achievement_kategori_list, format: :json) diff --git a/app/views/achievement_kategori_lists/index.json.jbuilder b/app/views/achievement_kategori_lists/index.json.jbuilder index 21687c1..2458553 100644 --- a/app/views/achievement_kategori_lists/index.json.jbuilder +++ b/app/views/achievement_kategori_lists/index.json.jbuilder @@ -1 +1,4 @@ -json.array! @achievement_kategori_lists, partial: "achievement_kategori_lists/achievement_kategori_list", as: :achievement_kategori_list +# frozen_string_literal: true + +json.array! @achievement_kategori_lists, partial: 'achievement_kategori_lists/achievement_kategori_list', + as: :achievement_kategori_list diff --git a/app/views/achievement_kategori_lists/show.json.jbuilder b/app/views/achievement_kategori_lists/show.json.jbuilder index 8fea84d..8885c46 100644 --- a/app/views/achievement_kategori_lists/show.json.jbuilder +++ b/app/views/achievement_kategori_lists/show.json.jbuilder @@ -1 +1,4 @@ -json.partial! "achievement_kategori_lists/achievement_kategori_list", achievement_kategori_list: @achievement_kategori_list +# frozen_string_literal: true + +json.partial! 'achievement_kategori_lists/achievement_kategori_list', + achievement_kategori_list: @achievement_kategori_list diff --git a/app/views/achievement_tingkat_lists/_achievement_tingkat_list.json.jbuilder b/app/views/achievement_tingkat_lists/_achievement_tingkat_list.json.jbuilder index ea4e64a..b1a6a81 100644 --- a/app/views/achievement_tingkat_lists/_achievement_tingkat_list.json.jbuilder +++ b/app/views/achievement_tingkat_lists/_achievement_tingkat_list.json.jbuilder @@ -1,2 +1,4 @@ +# frozen_string_literal: true + json.extract! achievement_tingkat_list, :id, :tingkat, :created_at, :updated_at json.url achievement_tingkat_list_url(achievement_tingkat_list, format: :json) diff --git a/app/views/achievement_tingkat_lists/index.json.jbuilder b/app/views/achievement_tingkat_lists/index.json.jbuilder index 99807ae..bcdf42e 100644 --- a/app/views/achievement_tingkat_lists/index.json.jbuilder +++ b/app/views/achievement_tingkat_lists/index.json.jbuilder @@ -1 +1,4 @@ -json.array! @achievement_tingkat_lists, partial: "achievement_tingkat_lists/achievement_tingkat_list", as: :achievement_tingkat_list +# frozen_string_literal: true + +json.array! @achievement_tingkat_lists, partial: 'achievement_tingkat_lists/achievement_tingkat_list', + as: :achievement_tingkat_list diff --git a/app/views/achievement_tingkat_lists/show.json.jbuilder b/app/views/achievement_tingkat_lists/show.json.jbuilder index be19cfe..efe7b8d 100644 --- a/app/views/achievement_tingkat_lists/show.json.jbuilder +++ b/app/views/achievement_tingkat_lists/show.json.jbuilder @@ -1 +1,3 @@ -json.partial! "achievement_tingkat_lists/achievement_tingkat_list", achievement_tingkat_list: @achievement_tingkat_list +# frozen_string_literal: true + +json.partial! 'achievement_tingkat_lists/achievement_tingkat_list', achievement_tingkat_list: @achievement_tingkat_list diff --git a/app/views/address_kabupaten_lists/_address_kabupaten_list.json.jbuilder b/app/views/address_kabupaten_lists/_address_kabupaten_list.json.jbuilder index 6402ef1..60350ce 100644 --- a/app/views/address_kabupaten_lists/_address_kabupaten_list.json.jbuilder +++ b/app/views/address_kabupaten_lists/_address_kabupaten_list.json.jbuilder @@ -1,2 +1,4 @@ +# frozen_string_literal: true + json.extract! address_kabupaten_list, :id, :kabupaten, :created_at, :updated_at json.url address_kabupaten_list_url(address_kabupaten_list, format: :json) diff --git a/app/views/address_kabupaten_lists/index.json.jbuilder b/app/views/address_kabupaten_lists/index.json.jbuilder index 4d99802..0e337ce 100644 --- a/app/views/address_kabupaten_lists/index.json.jbuilder +++ b/app/views/address_kabupaten_lists/index.json.jbuilder @@ -1 +1,4 @@ -json.array! @address_kabupaten_lists, partial: "address_kabupaten_lists/address_kabupaten_list", as: :address_kabupaten_list +# frozen_string_literal: true + +json.array! @address_kabupaten_lists, partial: 'address_kabupaten_lists/address_kabupaten_list', + as: :address_kabupaten_list diff --git a/app/views/address_kabupaten_lists/show.json.jbuilder b/app/views/address_kabupaten_lists/show.json.jbuilder index 96fd999..25d4737 100644 --- a/app/views/address_kabupaten_lists/show.json.jbuilder +++ b/app/views/address_kabupaten_lists/show.json.jbuilder @@ -1 +1,3 @@ -json.partial! "address_kabupaten_lists/address_kabupaten_list", address_kabupaten_list: @address_kabupaten_list +# frozen_string_literal: true + +json.partial! 'address_kabupaten_lists/address_kabupaten_list', address_kabupaten_list: @address_kabupaten_list diff --git a/app/views/address_kecamatan_lists/_address_kecamatan_list.json.jbuilder b/app/views/address_kecamatan_lists/_address_kecamatan_list.json.jbuilder index 8ce548b..103f405 100644 --- a/app/views/address_kecamatan_lists/_address_kecamatan_list.json.jbuilder +++ b/app/views/address_kecamatan_lists/_address_kecamatan_list.json.jbuilder @@ -1,2 +1,4 @@ +# frozen_string_literal: true + json.extract! address_kecamatan_list, :id, :kecamatan, :created_at, :updated_at json.url address_kecamatan_list_url(address_kecamatan_list, format: :json) diff --git a/app/views/address_kecamatan_lists/index.json.jbuilder b/app/views/address_kecamatan_lists/index.json.jbuilder index bded9f5..1eb93f6 100644 --- a/app/views/address_kecamatan_lists/index.json.jbuilder +++ b/app/views/address_kecamatan_lists/index.json.jbuilder @@ -1 +1,4 @@ -json.array! @address_kecamatan_lists, partial: "address_kecamatan_lists/address_kecamatan_list", as: :address_kecamatan_list +# frozen_string_literal: true + +json.array! @address_kecamatan_lists, partial: 'address_kecamatan_lists/address_kecamatan_list', + as: :address_kecamatan_list diff --git a/app/views/address_kecamatan_lists/show.json.jbuilder b/app/views/address_kecamatan_lists/show.json.jbuilder index 0159069..018bfa9 100644 --- a/app/views/address_kecamatan_lists/show.json.jbuilder +++ b/app/views/address_kecamatan_lists/show.json.jbuilder @@ -1 +1,3 @@ -json.partial! "address_kecamatan_lists/address_kecamatan_list", address_kecamatan_list: @address_kecamatan_list +# frozen_string_literal: true + +json.partial! 'address_kecamatan_lists/address_kecamatan_list', address_kecamatan_list: @address_kecamatan_list diff --git a/app/views/address_province_lists/_address_province_list.json.jbuilder b/app/views/address_province_lists/_address_province_list.json.jbuilder index 05dc3ef..4f8a3f9 100644 --- a/app/views/address_province_lists/_address_province_list.json.jbuilder +++ b/app/views/address_province_lists/_address_province_list.json.jbuilder @@ -1,2 +1,4 @@ +# frozen_string_literal: true + json.extract! address_province_list, :id, :provinsi, :created_at, :updated_at json.url address_province_list_url(address_province_list, format: :json) diff --git a/app/views/address_province_lists/index.json.jbuilder b/app/views/address_province_lists/index.json.jbuilder index ea5c0a1..b089fb6 100644 --- a/app/views/address_province_lists/index.json.jbuilder +++ b/app/views/address_province_lists/index.json.jbuilder @@ -1 +1,3 @@ -json.array! @address_province_lists, partial: "address_province_lists/address_province_list", as: :address_province_list +# frozen_string_literal: true + +json.array! @address_province_lists, partial: 'address_province_lists/address_province_list', as: :address_province_list diff --git a/app/views/address_province_lists/show.json.jbuilder b/app/views/address_province_lists/show.json.jbuilder index 3fd0194..b05adcc 100644 --- a/app/views/address_province_lists/show.json.jbuilder +++ b/app/views/address_province_lists/show.json.jbuilder @@ -1 +1,3 @@ -json.partial! "address_province_lists/address_province_list", address_province_list: @address_province_list +# frozen_string_literal: true + +json.partial! 'address_province_lists/address_province_list', address_province_list: @address_province_list diff --git a/app/views/all_school_lists/_all_school_list.json.jbuilder b/app/views/all_school_lists/_all_school_list.json.jbuilder index 58d4fa6..c5aa493 100644 --- a/app/views/all_school_lists/_all_school_list.json.jbuilder +++ b/app/views/all_school_lists/_all_school_list.json.jbuilder @@ -1,2 +1,4 @@ +# frozen_string_literal: true + json.extract! all_school_list, :id, :sekolah, :created_at, :updated_at json.url all_school_list_url(all_school_list, format: :json) diff --git a/app/views/all_school_lists/index.json.jbuilder b/app/views/all_school_lists/index.json.jbuilder index 7de7bb5..3625a5a 100644 --- a/app/views/all_school_lists/index.json.jbuilder +++ b/app/views/all_school_lists/index.json.jbuilder @@ -1 +1,3 @@ -json.array! @all_school_lists, partial: "all_school_lists/all_school_list", as: :all_school_list +# frozen_string_literal: true + +json.array! @all_school_lists, partial: 'all_school_lists/all_school_list', as: :all_school_list diff --git a/app/views/all_school_lists/show.json.jbuilder b/app/views/all_school_lists/show.json.jbuilder index 9236548..bdae92a 100644 --- a/app/views/all_school_lists/show.json.jbuilder +++ b/app/views/all_school_lists/show.json.jbuilder @@ -1 +1,3 @@ -json.partial! "all_school_lists/all_school_list", all_school_list: @all_school_list +# frozen_string_literal: true + +json.partial! 'all_school_lists/all_school_list', all_school_list: @all_school_list diff --git a/app/views/batch_lists/_batch_list.json.jbuilder b/app/views/batch_lists/_batch_list.json.jbuilder index 56b1ff6..cd55295 100644 --- a/app/views/batch_lists/_batch_list.json.jbuilder +++ b/app/views/batch_lists/_batch_list.json.jbuilder @@ -1,2 +1,4 @@ +# frozen_string_literal: true + json.extract! batch_list, :id, :gelombang, :aktif, :created_at, :updated_at json.url batch_list_url(batch_list, format: :json) diff --git a/app/views/batch_lists/index.json.jbuilder b/app/views/batch_lists/index.json.jbuilder index abc3563..33ab113 100644 --- a/app/views/batch_lists/index.json.jbuilder +++ b/app/views/batch_lists/index.json.jbuilder @@ -1 +1,3 @@ -json.array! @batch_lists, partial: "batch_lists/batch_list", as: :batch_list +# frozen_string_literal: true + +json.array! @batch_lists, partial: 'batch_lists/batch_list', as: :batch_list diff --git a/app/views/batch_lists/show.json.jbuilder b/app/views/batch_lists/show.json.jbuilder index f6bc0c6..6a66e7e 100644 --- a/app/views/batch_lists/show.json.jbuilder +++ b/app/views/batch_lists/show.json.jbuilder @@ -1 +1,3 @@ -json.partial! "batch_lists/batch_list", batch_list: @batch_list +# frozen_string_literal: true + +json.partial! 'batch_lists/batch_list', batch_list: @batch_list diff --git a/app/views/extra_lists/_extra_list.json.jbuilder b/app/views/extra_lists/_extra_list.json.jbuilder index 2192a3c..bd73cfe 100644 --- a/app/views/extra_lists/_extra_list.json.jbuilder +++ b/app/views/extra_lists/_extra_list.json.jbuilder @@ -1,2 +1,4 @@ +# frozen_string_literal: true + json.extract! extra_list, :id, :predikat, :created_at, :updated_at json.url extra_list_url(extra_list, format: :json) diff --git a/app/views/extra_lists/index.json.jbuilder b/app/views/extra_lists/index.json.jbuilder index 1065513..83443b6 100644 --- a/app/views/extra_lists/index.json.jbuilder +++ b/app/views/extra_lists/index.json.jbuilder @@ -1 +1,3 @@ -json.array! @extra_lists, partial: "extra_lists/extra_list", as: :extra_list +# frozen_string_literal: true + +json.array! @extra_lists, partial: 'extra_lists/extra_list', as: :extra_list diff --git a/app/views/extra_lists/show.json.jbuilder b/app/views/extra_lists/show.json.jbuilder index 74c7089..1894cc0 100644 --- a/app/views/extra_lists/show.json.jbuilder +++ b/app/views/extra_lists/show.json.jbuilder @@ -1 +1,3 @@ -json.partial! "extra_lists/extra_list", extra_list: @extra_list +# frozen_string_literal: true + +json.partial! 'extra_lists/extra_list', extra_list: @extra_list diff --git a/app/views/high_school_majors/_high_school_major.json.jbuilder b/app/views/high_school_majors/_high_school_major.json.jbuilder index 2b672e2..6057755 100644 --- a/app/views/high_school_majors/_high_school_major.json.jbuilder +++ b/app/views/high_school_majors/_high_school_major.json.jbuilder @@ -1,2 +1,4 @@ +# frozen_string_literal: true + json.extract! high_school_major, :id, :jurusan, :created_at, :updated_at json.url high_school_major_url(high_school_major, format: :json) diff --git a/app/views/high_school_majors/index.json.jbuilder b/app/views/high_school_majors/index.json.jbuilder index b2839d8..ae87245 100644 --- a/app/views/high_school_majors/index.json.jbuilder +++ b/app/views/high_school_majors/index.json.jbuilder @@ -1 +1,3 @@ -json.array! @high_school_majors, partial: "high_school_majors/high_school_major", as: :high_school_major +# frozen_string_literal: true + +json.array! @high_school_majors, partial: 'high_school_majors/high_school_major', as: :high_school_major diff --git a/app/views/high_school_majors/show.json.jbuilder b/app/views/high_school_majors/show.json.jbuilder index d77f5e9..bb741e2 100644 --- a/app/views/high_school_majors/show.json.jbuilder +++ b/app/views/high_school_majors/show.json.jbuilder @@ -1 +1,3 @@ -json.partial! "high_school_majors/high_school_major", high_school_major: @high_school_major +# frozen_string_literal: true + +json.partial! 'high_school_majors/high_school_major', high_school_major: @high_school_major diff --git a/app/views/language_degree_lists/_language_degree_list.json.jbuilder b/app/views/language_degree_lists/_language_degree_list.json.jbuilder index 5a4a6bc..a3c9679 100644 --- a/app/views/language_degree_lists/_language_degree_list.json.jbuilder +++ b/app/views/language_degree_lists/_language_degree_list.json.jbuilder @@ -1,2 +1,4 @@ +# frozen_string_literal: true + json.extract! language_degree_list, :id, :tingkat, :created_at, :updated_at json.url language_degree_list_url(language_degree_list, format: :json) diff --git a/app/views/language_degree_lists/index.json.jbuilder b/app/views/language_degree_lists/index.json.jbuilder index da143b4..672d93d 100644 --- a/app/views/language_degree_lists/index.json.jbuilder +++ b/app/views/language_degree_lists/index.json.jbuilder @@ -1 +1,3 @@ -json.array! @language_degree_lists, partial: "language_degree_lists/language_degree_list", as: :language_degree_list +# frozen_string_literal: true + +json.array! @language_degree_lists, partial: 'language_degree_lists/language_degree_list', as: :language_degree_list diff --git a/app/views/language_degree_lists/show.json.jbuilder b/app/views/language_degree_lists/show.json.jbuilder index cb85150..1a7c443 100644 --- a/app/views/language_degree_lists/show.json.jbuilder +++ b/app/views/language_degree_lists/show.json.jbuilder @@ -1 +1,3 @@ -json.partial! "language_degree_lists/language_degree_list", language_degree_list: @language_degree_list +# frozen_string_literal: true + +json.partial! 'language_degree_lists/language_degree_list', language_degree_list: @language_degree_list diff --git a/app/views/language_name_lists/_language_name_list.json.jbuilder b/app/views/language_name_lists/_language_name_list.json.jbuilder index 73cb472..2584908 100644 --- a/app/views/language_name_lists/_language_name_list.json.jbuilder +++ b/app/views/language_name_lists/_language_name_list.json.jbuilder @@ -1,2 +1,4 @@ +# frozen_string_literal: true + json.extract! language_name_list, :id, :bahasa, :created_at, :updated_at json.url language_name_list_url(language_name_list, format: :json) diff --git a/app/views/language_name_lists/index.json.jbuilder b/app/views/language_name_lists/index.json.jbuilder index 9f3683d..d7aaead 100644 --- a/app/views/language_name_lists/index.json.jbuilder +++ b/app/views/language_name_lists/index.json.jbuilder @@ -1 +1,3 @@ -json.array! @language_name_lists, partial: "language_name_lists/language_name_list", as: :language_name_list +# frozen_string_literal: true + +json.array! @language_name_lists, partial: 'language_name_lists/language_name_list', as: :language_name_list diff --git a/app/views/language_name_lists/show.json.jbuilder b/app/views/language_name_lists/show.json.jbuilder index 315962a..f32d47c 100644 --- a/app/views/language_name_lists/show.json.jbuilder +++ b/app/views/language_name_lists/show.json.jbuilder @@ -1 +1,3 @@ -json.partial! "language_name_lists/language_name_list", language_name_list: @language_name_list +# frozen_string_literal: true + +json.partial! 'language_name_lists/language_name_list', language_name_list: @language_name_list diff --git a/app/views/major_lists/_major_list.json.jbuilder b/app/views/major_lists/_major_list.json.jbuilder index efa705c..2538c35 100644 --- a/app/views/major_lists/_major_list.json.jbuilder +++ b/app/views/major_lists/_major_list.json.jbuilder @@ -1,2 +1,4 @@ +# frozen_string_literal: true + json.extract! major_list, :id, :jurusan, :created_at, :updated_at json.url major_list_url(major_list, format: :json) diff --git a/app/views/major_lists/index.json.jbuilder b/app/views/major_lists/index.json.jbuilder index 6abce65..fa83fce 100644 --- a/app/views/major_lists/index.json.jbuilder +++ b/app/views/major_lists/index.json.jbuilder @@ -1 +1,3 @@ -json.array! @major_lists, partial: "major_lists/major_list", as: :major_list +# frozen_string_literal: true + +json.array! @major_lists, partial: 'major_lists/major_list', as: :major_list diff --git a/app/views/major_lists/show.json.jbuilder b/app/views/major_lists/show.json.jbuilder index c83d553..cfd72c5 100644 --- a/app/views/major_lists/show.json.jbuilder +++ b/app/views/major_lists/show.json.jbuilder @@ -1 +1,3 @@ -json.partial! "major_lists/major_list", major_list: @major_list +# frozen_string_literal: true + +json.partial! 'major_lists/major_list', major_list: @major_list diff --git a/app/views/organization_degree_lists/_organization_degree_list.json.jbuilder b/app/views/organization_degree_lists/_organization_degree_list.json.jbuilder index 6cb5169..67baf61 100644 --- a/app/views/organization_degree_lists/_organization_degree_list.json.jbuilder +++ b/app/views/organization_degree_lists/_organization_degree_list.json.jbuilder @@ -1,2 +1,4 @@ +# frozen_string_literal: true + json.extract! organization_degree_list, :id, :jabatan, :created_at, :updated_at json.url organization_degree_list_url(organization_degree_list, format: :json) diff --git a/app/views/organization_degree_lists/index.json.jbuilder b/app/views/organization_degree_lists/index.json.jbuilder index cf5168d..d524bbe 100644 --- a/app/views/organization_degree_lists/index.json.jbuilder +++ b/app/views/organization_degree_lists/index.json.jbuilder @@ -1 +1,4 @@ -json.array! @organization_degree_lists, partial: "organization_degree_lists/organization_degree_list", as: :organization_degree_list +# frozen_string_literal: true + +json.array! @organization_degree_lists, partial: 'organization_degree_lists/organization_degree_list', + as: :organization_degree_list diff --git a/app/views/organization_degree_lists/show.json.jbuilder b/app/views/organization_degree_lists/show.json.jbuilder index 5d6bfb9..980cd47 100644 --- a/app/views/organization_degree_lists/show.json.jbuilder +++ b/app/views/organization_degree_lists/show.json.jbuilder @@ -1 +1,3 @@ -json.partial! "organization_degree_lists/organization_degree_list", organization_degree_list: @organization_degree_list +# frozen_string_literal: true + +json.partial! 'organization_degree_lists/organization_degree_list', organization_degree_list: @organization_degree_list diff --git a/app/views/parent_education_lists/_parent_education_list.json.jbuilder b/app/views/parent_education_lists/_parent_education_list.json.jbuilder index 54c85b7..87f2c60 100644 --- a/app/views/parent_education_lists/_parent_education_list.json.jbuilder +++ b/app/views/parent_education_lists/_parent_education_list.json.jbuilder @@ -1,2 +1,4 @@ +# frozen_string_literal: true + json.extract! parent_education_list, :id, :pendidikan, :created_at, :updated_at json.url parent_education_list_url(parent_education_list, format: :json) diff --git a/app/views/parent_education_lists/index.json.jbuilder b/app/views/parent_education_lists/index.json.jbuilder index 0361bfd..ac657d9 100644 --- a/app/views/parent_education_lists/index.json.jbuilder +++ b/app/views/parent_education_lists/index.json.jbuilder @@ -1 +1,3 @@ -json.array! @parent_education_lists, partial: "parent_education_lists/parent_education_list", as: :parent_education_list +# frozen_string_literal: true + +json.array! @parent_education_lists, partial: 'parent_education_lists/parent_education_list', as: :parent_education_list diff --git a/app/views/parent_education_lists/show.json.jbuilder b/app/views/parent_education_lists/show.json.jbuilder index e3d8588..5412e5c 100644 --- a/app/views/parent_education_lists/show.json.jbuilder +++ b/app/views/parent_education_lists/show.json.jbuilder @@ -1 +1,3 @@ -json.partial! "parent_education_lists/parent_education_list", parent_education_list: @parent_education_list +# frozen_string_literal: true + +json.partial! 'parent_education_lists/parent_education_list', parent_education_list: @parent_education_list diff --git a/app/views/parent_job_lists/_parent_job_list.json.jbuilder b/app/views/parent_job_lists/_parent_job_list.json.jbuilder index a41b851..375383a 100644 --- a/app/views/parent_job_lists/_parent_job_list.json.jbuilder +++ b/app/views/parent_job_lists/_parent_job_list.json.jbuilder @@ -1,2 +1,4 @@ +# frozen_string_literal: true + json.extract! parent_job_list, :id, :pekerjaan, :created_at, :updated_at json.url parent_job_list_url(parent_job_list, format: :json) diff --git a/app/views/parent_job_lists/index.json.jbuilder b/app/views/parent_job_lists/index.json.jbuilder index e5ebd9e..154d2f5 100644 --- a/app/views/parent_job_lists/index.json.jbuilder +++ b/app/views/parent_job_lists/index.json.jbuilder @@ -1 +1,3 @@ -json.array! @parent_job_lists, partial: "parent_job_lists/parent_job_list", as: :parent_job_list +# frozen_string_literal: true + +json.array! @parent_job_lists, partial: 'parent_job_lists/parent_job_list', as: :parent_job_list diff --git a/app/views/parent_job_lists/show.json.jbuilder b/app/views/parent_job_lists/show.json.jbuilder index 938a171..f0da508 100644 --- a/app/views/parent_job_lists/show.json.jbuilder +++ b/app/views/parent_job_lists/show.json.jbuilder @@ -1 +1,3 @@ -json.partial! "parent_job_lists/parent_job_list", parent_job_list: @parent_job_list +# frozen_string_literal: true + +json.partial! 'parent_job_lists/parent_job_list', parent_job_list: @parent_job_list diff --git a/app/views/personal_gender_lists/_personal_gender_list.json.jbuilder b/app/views/personal_gender_lists/_personal_gender_list.json.jbuilder index ee1bc8d..60b1d61 100644 --- a/app/views/personal_gender_lists/_personal_gender_list.json.jbuilder +++ b/app/views/personal_gender_lists/_personal_gender_list.json.jbuilder @@ -1,2 +1,4 @@ +# frozen_string_literal: true + json.extract! personal_gender_list, :id, :jenis_kelamin, :created_at, :updated_at json.url personal_gender_list_url(personal_gender_list, format: :json) diff --git a/app/views/personal_gender_lists/index.json.jbuilder b/app/views/personal_gender_lists/index.json.jbuilder index 6c996d4..8cc1282 100644 --- a/app/views/personal_gender_lists/index.json.jbuilder +++ b/app/views/personal_gender_lists/index.json.jbuilder @@ -1 +1,3 @@ -json.array! @personal_gender_lists, partial: "personal_gender_lists/personal_gender_list", as: :personal_gender_list +# frozen_string_literal: true + +json.array! @personal_gender_lists, partial: 'personal_gender_lists/personal_gender_list', as: :personal_gender_list diff --git a/app/views/personal_gender_lists/show.json.jbuilder b/app/views/personal_gender_lists/show.json.jbuilder index f8e0207..985c905 100644 --- a/app/views/personal_gender_lists/show.json.jbuilder +++ b/app/views/personal_gender_lists/show.json.jbuilder @@ -1 +1,3 @@ -json.partial! "personal_gender_lists/personal_gender_list", personal_gender_list: @personal_gender_list +# frozen_string_literal: true + +json.partial! 'personal_gender_lists/personal_gender_list', personal_gender_list: @personal_gender_list diff --git a/app/views/personal_religion_lists/_personal_religion_list.json.jbuilder b/app/views/personal_religion_lists/_personal_religion_list.json.jbuilder index 9b1664b..422e30b 100644 --- a/app/views/personal_religion_lists/_personal_religion_list.json.jbuilder +++ b/app/views/personal_religion_lists/_personal_religion_list.json.jbuilder @@ -1,2 +1,4 @@ +# frozen_string_literal: true + json.extract! personal_religion_list, :id, :agama, :created_at, :updated_at json.url personal_religion_list_url(personal_religion_list, format: :json) diff --git a/app/views/personal_religion_lists/index.json.jbuilder b/app/views/personal_religion_lists/index.json.jbuilder index e211478..336c265 100644 --- a/app/views/personal_religion_lists/index.json.jbuilder +++ b/app/views/personal_religion_lists/index.json.jbuilder @@ -1 +1,4 @@ -json.array! @personal_religion_lists, partial: "personal_religion_lists/personal_religion_list", as: :personal_religion_list +# frozen_string_literal: true + +json.array! @personal_religion_lists, partial: 'personal_religion_lists/personal_religion_list', + as: :personal_religion_list diff --git a/app/views/personal_religion_lists/show.json.jbuilder b/app/views/personal_religion_lists/show.json.jbuilder index b1f67c8..63067ee 100644 --- a/app/views/personal_religion_lists/show.json.jbuilder +++ b/app/views/personal_religion_lists/show.json.jbuilder @@ -1 +1,3 @@ -json.partial! "personal_religion_lists/personal_religion_list", personal_religion_list: @personal_religion_list +# frozen_string_literal: true + +json.partial! 'personal_religion_lists/personal_religion_list', personal_religion_list: @personal_religion_list diff --git a/app/views/pmdk_school_lists/_pmdk_school_list.json.jbuilder b/app/views/pmdk_school_lists/_pmdk_school_list.json.jbuilder index ccd66b9..765cd29 100644 --- a/app/views/pmdk_school_lists/_pmdk_school_list.json.jbuilder +++ b/app/views/pmdk_school_lists/_pmdk_school_list.json.jbuilder @@ -1,2 +1,4 @@ +# frozen_string_literal: true + json.extract! pmdk_school_list, :id, :sekolah, :created_at, :updated_at json.url pmdk_school_list_url(pmdk_school_list, format: :json) diff --git a/app/views/pmdk_school_lists/index.json.jbuilder b/app/views/pmdk_school_lists/index.json.jbuilder index 8123458..0b28210 100644 --- a/app/views/pmdk_school_lists/index.json.jbuilder +++ b/app/views/pmdk_school_lists/index.json.jbuilder @@ -1 +1,3 @@ -json.array! @pmdk_school_lists, partial: "pmdk_school_lists/pmdk_school_list", as: :pmdk_school_list +# frozen_string_literal: true + +json.array! @pmdk_school_lists, partial: 'pmdk_school_lists/pmdk_school_list', as: :pmdk_school_list diff --git a/app/views/pmdk_school_lists/show.json.jbuilder b/app/views/pmdk_school_lists/show.json.jbuilder index f7decd6..5ab7973 100644 --- a/app/views/pmdk_school_lists/show.json.jbuilder +++ b/app/views/pmdk_school_lists/show.json.jbuilder @@ -1 +1,3 @@ -json.partial! "pmdk_school_lists/pmdk_school_list", pmdk_school_list: @pmdk_school_list +# frozen_string_literal: true + +json.partial! 'pmdk_school_lists/pmdk_school_list', pmdk_school_list: @pmdk_school_list diff --git a/app/views/source_information_lists/_source_information_list.json.jbuilder b/app/views/source_information_lists/_source_information_list.json.jbuilder index ae5e855..fde63fc 100644 --- a/app/views/source_information_lists/_source_information_list.json.jbuilder +++ b/app/views/source_information_lists/_source_information_list.json.jbuilder @@ -1,2 +1,4 @@ +# frozen_string_literal: true + json.extract! source_information_list, :id, :informasi, :created_at, :updated_at json.url source_information_list_url(source_information_list, format: :json) diff --git a/app/views/source_information_lists/index.json.jbuilder b/app/views/source_information_lists/index.json.jbuilder index 7c7a72c..9bd322a 100644 --- a/app/views/source_information_lists/index.json.jbuilder +++ b/app/views/source_information_lists/index.json.jbuilder @@ -1 +1,4 @@ -json.array! @source_information_lists, partial: "source_information_lists/source_information_list", as: :source_information_list +# frozen_string_literal: true + +json.array! @source_information_lists, partial: 'source_information_lists/source_information_list', + as: :source_information_list diff --git a/app/views/source_information_lists/show.json.jbuilder b/app/views/source_information_lists/show.json.jbuilder index c7c514b..48f0e86 100644 --- a/app/views/source_information_lists/show.json.jbuilder +++ b/app/views/source_information_lists/show.json.jbuilder @@ -1 +1,3 @@ -json.partial! "source_information_lists/source_information_list", source_information_list: @source_information_list +# frozen_string_literal: true + +json.partial! 'source_information_lists/source_information_list', source_information_list: @source_information_list diff --git a/app/views/source_motivation_lists/_source_motivation_list.json.jbuilder b/app/views/source_motivation_lists/_source_motivation_list.json.jbuilder index ed6850c..8d4241e 100644 --- a/app/views/source_motivation_lists/_source_motivation_list.json.jbuilder +++ b/app/views/source_motivation_lists/_source_motivation_list.json.jbuilder @@ -1,2 +1,4 @@ +# frozen_string_literal: true + json.extract! source_motivation_list, :id, :motivasi, :created_at, :updated_at json.url source_motivation_list_url(source_motivation_list, format: :json) diff --git a/app/views/source_motivation_lists/index.json.jbuilder b/app/views/source_motivation_lists/index.json.jbuilder index 9fa4716..9004d65 100644 --- a/app/views/source_motivation_lists/index.json.jbuilder +++ b/app/views/source_motivation_lists/index.json.jbuilder @@ -1 +1,4 @@ -json.array! @source_motivation_lists, partial: "source_motivation_lists/source_motivation_list", as: :source_motivation_list +# frozen_string_literal: true + +json.array! @source_motivation_lists, partial: 'source_motivation_lists/source_motivation_list', + as: :source_motivation_list diff --git a/app/views/source_motivation_lists/show.json.jbuilder b/app/views/source_motivation_lists/show.json.jbuilder index 446f128..ec31d62 100644 --- a/app/views/source_motivation_lists/show.json.jbuilder +++ b/app/views/source_motivation_lists/show.json.jbuilder @@ -1 +1,3 @@ -json.partial! "source_motivation_lists/source_motivation_list", source_motivation_list: @source_motivation_list +# frozen_string_literal: true + +json.partial! 'source_motivation_lists/source_motivation_list', source_motivation_list: @source_motivation_list diff --git a/bin/bundle b/bin/bundle index 50da5fd..ef688ec 100644 --- a/bin/bundle +++ b/bin/bundle @@ -8,46 +8,46 @@ # this file is here to facilitate running it. # -require "rubygems" +require 'rubygems' m = Module.new do module_function def invoked_as_script? - File.expand_path($0) == File.expand_path(__FILE__) + File.expand_path($PROGRAM_NAME) == File.expand_path(__FILE__) end def env_var_version - ENV["BUNDLER_VERSION"] + ENV['BUNDLER_VERSION'] end def cli_arg_version return unless invoked_as_script? # don't want to hijack other binstubs - return unless "update".start_with?(ARGV.first || " ") # must be running `bundle update` + return unless 'update'.start_with?(ARGV.first || ' ') # must be running `bundle update` + bundler_version = nil update_index = nil ARGV.each_with_index do |a, i| - if update_index && update_index.succ == i && a.match?(Gem::Version::ANCHORED_VERSION_PATTERN) - bundler_version = a - end + bundler_version = a if update_index && update_index.succ == i && a.match?(Gem::Version::ANCHORED_VERSION_PATTERN) next unless a =~ /\A--bundler(?:[= ](#{Gem::Version::VERSION_PATTERN}))?\z/ - bundler_version = $1 + + bundler_version = Regexp.last_match(1) update_index = i end bundler_version end def gemfile - gemfile = ENV["BUNDLE_GEMFILE"] + gemfile = ENV['BUNDLE_GEMFILE'] return gemfile if gemfile && !gemfile.empty? - File.expand_path("../Gemfile", __dir__) + File.expand_path('../Gemfile', __dir__) end def lockfile lockfile = case File.basename(gemfile) - when "gems.rb" then gemfile.sub(/\.rb$/, ".locked") + when 'gems.rb' then gemfile.sub(/\.rb$/, '.locked') else "#{gemfile}.lock" end File.expand_path(lockfile) @@ -55,8 +55,10 @@ m = Module.new do def lockfile_version return unless File.file?(lockfile) + lockfile_contents = File.read(lockfile) return unless lockfile_contents =~ /\n\nBUNDLED WITH\n\s{2,}(#{Gem::Version::VERSION_PATTERN})\n/ + Regexp.last_match(1) end @@ -76,20 +78,24 @@ m = Module.new do end def load_bundler! - ENV["BUNDLE_GEMFILE"] ||= gemfile + ENV['BUNDLE_GEMFILE'] ||= gemfile activate_bundler end def activate_bundler gem_error = activation_error_handling do - gem "bundler", bundler_requirement + gem 'bundler', bundler_requirement end return if gem_error.nil? + require_error = activation_error_handling do - require "bundler/version" + require 'bundler/version' + end + if require_error.nil? && Gem::Requirement.new(bundler_requirement).satisfied_by?(Gem::Version.new(Bundler::VERSION)) + return end - return if require_error.nil? && Gem::Requirement.new(bundler_requirement).satisfied_by?(Gem::Version.new(Bundler::VERSION)) + warn "Activating bundler (#{bundler_requirement}) failed:\n#{gem_error.message}\n\nTo install the version of bundler this project requires, run `gem install bundler -v '#{bundler_requirement}'`" exit 42 end @@ -104,6 +110,4 @@ end m.load_bundler! -if m.invoked_as_script? - load Gem.bin_path("bundler", "bundle") -end +load Gem.bin_path('bundler', 'bundle') if m.invoked_as_script? diff --git a/bin/importmap b/bin/importmap index 36502ab..d423864 100644 --- a/bin/importmap +++ b/bin/importmap @@ -1,4 +1,5 @@ #!/usr/bin/env ruby +# frozen_string_literal: true -require_relative "../config/application" -require "importmap/commands" +require_relative '../config/application' +require 'importmap/commands' diff --git a/bin/rails b/bin/rails index efc0377..a31728a 100644 --- a/bin/rails +++ b/bin/rails @@ -1,4 +1,6 @@ #!/usr/bin/env ruby -APP_PATH = File.expand_path("../config/application", __dir__) -require_relative "../config/boot" -require "rails/commands" +# frozen_string_literal: true + +APP_PATH = File.expand_path('../config/application', __dir__) +require_relative '../config/boot' +require 'rails/commands' diff --git a/bin/rake b/bin/rake index 4fbf10b..c199955 100644 --- a/bin/rake +++ b/bin/rake @@ -1,4 +1,6 @@ #!/usr/bin/env ruby -require_relative "../config/boot" -require "rake" +# frozen_string_literal: true + +require_relative '../config/boot' +require 'rake' Rake.application.run diff --git a/bin/setup b/bin/setup index 3cd5a9d..3a74034 100644 --- a/bin/setup +++ b/bin/setup @@ -1,8 +1,10 @@ #!/usr/bin/env ruby -require "fileutils" +# frozen_string_literal: true + +require 'fileutils' # path to your application root. -APP_ROOT = File.expand_path("..", __dir__) +APP_ROOT = File.expand_path('..', __dir__) def system!(*args) system(*args, exception: true) @@ -13,9 +15,9 @@ FileUtils.chdir APP_ROOT do # This script is idempotent, so that you can run it at any time and get an expectable outcome. # Add necessary setup steps to this file. - puts "== Installing dependencies ==" - system! "gem install bundler --conservative" - system("bundle check") || system!("bundle install") + puts '== Installing dependencies ==' + system! 'gem install bundler --conservative' + system('bundle check') || system!('bundle install') # puts "\n== Copying sample files ==" # unless File.exist?("config/database.yml") @@ -23,11 +25,11 @@ FileUtils.chdir APP_ROOT do # end puts "\n== Preparing database ==" - system! "bin/rails db:prepare" + system! 'bin/rails db:prepare' puts "\n== Removing old logs and tempfiles ==" - system! "bin/rails log:clear tmp:clear" + system! 'bin/rails log:clear tmp:clear' puts "\n== Restarting application server ==" - system! "bin/rails restart" + system! 'bin/rails restart' end diff --git a/config.ru b/config.ru index 4a3c09a..6dc8321 100644 --- a/config.ru +++ b/config.ru @@ -1,6 +1,8 @@ +# frozen_string_literal: true + # This file is used by Rack-based servers to start the application. -require_relative "config/environment" +require_relative 'config/environment' run Rails.application Rails.application.load_server diff --git a/config/application.rb b/config/application.rb index bfc3062..eba7dac 100644 --- a/config/application.rb +++ b/config/application.rb @@ -1,6 +1,8 @@ -require_relative "boot" +# frozen_string_literal: true -require "rails/all" +require_relative 'boot' + +require 'rails/all' # Require the gems listed in Gemfile, including any gems # you've limited to :test, :development, or :production. @@ -14,7 +16,7 @@ class Application < Rails::Application # Please, add to the `ignore` list any other `lib` subdirectories that do # not contain `.rb` files, or that should not be reloaded or eager loaded. # Common ones are `templates`, `generators`, or `middleware`, for example. - config.autoload_lib(ignore: %w(assets tasks)) + config.autoload_lib(ignore: %w[assets tasks]) # Configuration for the application, engines, and railties goes here. # diff --git a/config/boot.rb b/config/boot.rb index 988a5dd..c04863f 100644 --- a/config/boot.rb +++ b/config/boot.rb @@ -1,4 +1,6 @@ -ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) +# frozen_string_literal: true -require "bundler/setup" # Set up gems listed in the Gemfile. -require "bootsnap/setup" # Speed up boot time by caching expensive operations. +ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) + +require 'bundler/setup' # Set up gems listed in the Gemfile. +require 'bootsnap/setup' # Speed up boot time by caching expensive operations. diff --git a/config/environment.rb b/config/environment.rb index cac5315..d5abe55 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -1,5 +1,7 @@ +# frozen_string_literal: true + # Load the Rails application. -require_relative "application" +require_relative 'application' # Initialize the Rails application. Rails.application.initialize! diff --git a/config/environments/development.rb b/config/environments/development.rb index ca6e6a1..7ce0031 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -1,4 +1,6 @@ -require "active_support/core_ext/integer/time" +# frozen_string_literal: true + +require 'active_support/core_ext/integer/time' Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. @@ -19,13 +21,13 @@ # Enable/disable caching. By default caching is disabled. # Run rails dev:cache to toggle caching. - if Rails.root.join("tmp/caching-dev.txt").exist? + if Rails.root.join('tmp/caching-dev.txt').exist? config.action_controller.perform_caching = true config.action_controller.enable_fragment_cache_logging = true config.cache_store = :memory_store config.public_file_server.headers = { - "Cache-Control" => "public, max-age=#{2.days.to_i}" + 'Cache-Control' => "public, max-age=#{2.days.to_i}" } else config.action_controller.perform_caching = false @@ -39,8 +41,8 @@ # Don't care if the mailer can't send. config.action_mailer.raise_delivery_errors = false # email preview configuration - host = '127.0.0.1:3000' #local server - config.action_mailer.default_url_options = {host: host, protocol: 'http'} + host = '127.0.0.1:3000' # local server + config.action_mailer.default_url_options = { host:, protocol: 'http' } config.action_mailer.perform_caching = false # Print deprecation notices to the Rails logger. diff --git a/config/environments/production.rb b/config/environments/production.rb index 964f147..6dfbca1 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -1,4 +1,6 @@ -require "active_support/core_ext/integer/time" +# frozen_string_literal: true + +require 'active_support/core_ext/integer/time' Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. @@ -37,7 +39,7 @@ # config.action_dispatch.x_sendfile_header = "X-Accel-Redirect" # for NGINX # Store uploaded files on the local file system (see config/storage.yml for options). - #config.active_storage.service = :local + # config.active_storage.service = :local # store upload file on amazon config.active_storage.service = :amazon @@ -54,17 +56,17 @@ config.force_ssl = true # Log to STDOUT by default - config.logger = ActiveSupport::Logger.new(STDOUT) - .tap { |logger| logger.formatter = ::Logger::Formatter.new } - .then { |logger| ActiveSupport::TaggedLogging.new(logger) } + config.logger = ActiveSupport::Logger.new($stdout) + .tap { |logger| logger.formatter = ::Logger::Formatter.new } + .then { |logger| ActiveSupport::TaggedLogging.new(logger) } # Prepend all log lines with the following tags. - config.log_tags = [ :request_id ] + config.log_tags = [:request_id] # Info include generic and useful information about system operation, but avoids logging too much # information to avoid inadvertent exposure of personally identifiable information (PII). If you # want to log everything, set the level to "debug". - config.log_level = ENV.fetch("RAILS_LOG_LEVEL", "info") + config.log_level = ENV.fetch('RAILS_LOG_LEVEL', 'info') # Use a different cache store in production. # config.cache_store = :mem_cache_store @@ -79,14 +81,14 @@ # Set this to true and configure the email server for immediate delivery to raise delivery errors. config.action_mailer.raise_delivery_errors = false config.action_mailer.delivery_method = :smtp - host = 'https://radiant-ridge-52163-0408a552c9ca.herokuapp.com/' - config.action_mailer.default_url_options = { host: host } + host = 'https://radiant-ridge-52163-0408a552c9ca.herokuapp.com/' + config.action_mailer.default_url_options = { host: } config.action_mailer.smtp_settings = { - :address => 'smtp-relay.sendinblue.com', - :port => 587, - :user_name => ENV['SENDINBLUE_SMTP_LOGIN'], - :password => ENV['SENDINBLUE_SMTP_PASSWORD'], - :authentication => :login + address: 'smtp-relay.sendinblue.com', + port: 587, + user_name: ENV['SENDINBLUE_SMTP_LOGIN'], + password: ENV['SENDINBLUE_SMTP_PASSWORD'], + authentication: :login } # Enable locale fallbacks for I18n (makes lookups for any locale fall back to # the I18n.default_locale when a translation cannot be found). diff --git a/config/environments/test.rb b/config/environments/test.rb index 63d7873..e9201e8 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -1,4 +1,6 @@ -require "active_support/core_ext/integer/time" +# frozen_string_literal: true + +require 'active_support/core_ext/integer/time' # The test environment is used exclusively to run your application's # test suite. You never need to work with it otherwise. Remember that @@ -15,12 +17,12 @@ # this is usually not necessary, and can slow down your test suite. However, it's # recommended that you enable it in continuous integration systems to ensure eager # loading is working properly before deploying your code. - config.eager_load = ENV["CI"].present? + config.eager_load = ENV['CI'].present? # Configure public file server for tests with Cache-Control for performance. config.public_file_server.enabled = true config.public_file_server.headers = { - "Cache-Control" => "public, max-age=#{1.hour.to_i}" + 'Cache-Control' => "public, max-age=#{1.hour.to_i}" } # Show full error reports and disable caching. @@ -43,8 +45,8 @@ # The :test delivery method accumulates sent emails in the # ActionMailer::Base.deliveries array. config.action_mailer.delivery_method = :test - #setting test domain host - config.action_mailer.default_url_options = {host: 'example.com'} + # setting test domain host + config.action_mailer.default_url_options = { host: 'example.com' } # Print deprecation notices to the stderr. config.active_support.deprecation = :stderr diff --git a/config/importmap.rb b/config/importmap.rb index 8701500..ba9deaf 100644 --- a/config/importmap.rb +++ b/config/importmap.rb @@ -1,9 +1,11 @@ +# frozen_string_literal: true + # Pin npm packages by running ./bin/importmap -pin "application", preload: true -pin "@hotwired/turbo-rails", to: "turbo.min.js", preload: true -pin "@hotwired/stimulus", to: "stimulus.min.js", preload: true -pin "@hotwired/stimulus-loading", to: "stimulus-loading.js", preload: true -pin_all_from "app/javascript/controllers", under: "controllers" -#use ujs with rails -#pin "@rails/ujs", to: "rails-ujs/dist/ujs.js", preload: true \ No newline at end of file +pin 'application', preload: true +pin '@hotwired/turbo-rails', to: 'turbo.min.js', preload: true +pin '@hotwired/stimulus', to: 'stimulus.min.js', preload: true +pin '@hotwired/stimulus-loading', to: 'stimulus-loading.js', preload: true +pin_all_from 'app/javascript/controllers', under: 'controllers' +# use ujs with rails +# pin "@rails/ujs", to: "rails-ujs/dist/ujs.js", preload: true diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb index 2eeef96..bcafccd 100644 --- a/config/initializers/assets.rb +++ b/config/initializers/assets.rb @@ -1,7 +1,9 @@ +# frozen_string_literal: true + # Be sure to restart your server when you modify this file. # Version of your assets, change this if you want to expire all your assets. -Rails.application.config.assets.version = "1.0" +Rails.application.config.assets.version = '1.0' # Add additional assets to the asset load path. # Rails.application.config.assets.paths << Emoji.images_path diff --git a/config/initializers/content_security_policy.rb b/config/initializers/content_security_policy.rb index b3076b3..af395e4 100644 --- a/config/initializers/content_security_policy.rb +++ b/config/initializers/content_security_policy.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # Be sure to restart your server when you modify this file. # Define an application-wide content security policy. diff --git a/config/initializers/filter_parameter_logging.rb b/config/initializers/filter_parameter_logging.rb index c2d89e2..c416e6a 100644 --- a/config/initializers/filter_parameter_logging.rb +++ b/config/initializers/filter_parameter_logging.rb @@ -1,8 +1,10 @@ +# frozen_string_literal: true + # Be sure to restart your server when you modify this file. # Configure parameters to be partially matched (e.g. passw matches password) and filtered from the log file. # Use this to limit dissemination of sensitive information. # See the ActiveSupport::ParameterFilter documentation for supported notations and behaviors. -Rails.application.config.filter_parameters += [ - :passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn +Rails.application.config.filter_parameters += %i[ + passw secret token _key crypt salt certificate otp ssn ] diff --git a/config/initializers/inflections.rb b/config/initializers/inflections.rb index 3860f65..6c78420 100644 --- a/config/initializers/inflections.rb +++ b/config/initializers/inflections.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # Be sure to restart your server when you modify this file. # Add new inflection rules using the following format. Inflections diff --git a/config/initializers/permissions_policy.rb b/config/initializers/permissions_policy.rb index 7db3b95..b635b52 100644 --- a/config/initializers/permissions_policy.rb +++ b/config/initializers/permissions_policy.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # Be sure to restart your server when you modify this file. # Define an application-wide HTTP permissions policy. For further diff --git a/config/puma.rb b/config/puma.rb index afa809b..7ed4157 100644 --- a/config/puma.rb +++ b/config/puma.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # This configuration file will be evaluated by Puma. The top-level methods that # are invoked here are part of Puma's configuration DSL. For more information # about methods provided by the DSL, see https://puma.io/puma/Puma/DSL.html. @@ -7,29 +9,29 @@ # Any libraries that use thread pools should be configured to match # the maximum value specified for Puma. Default is set to 5 threads for minimum # and maximum; this matches the default thread size of Active Record. -max_threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 } -min_threads_count = ENV.fetch("RAILS_MIN_THREADS") { max_threads_count } +max_threads_count = ENV.fetch('RAILS_MAX_THREADS', 5) +min_threads_count = ENV.fetch('RAILS_MIN_THREADS') { max_threads_count } threads min_threads_count, max_threads_count # Specifies that the worker count should equal the number of processors in production. -if ENV["RAILS_ENV"] == "production" - require "concurrent-ruby" - worker_count = Integer(ENV.fetch("WEB_CONCURRENCY") { Concurrent.physical_processor_count }) +if ENV['RAILS_ENV'] == 'production' + require 'concurrent-ruby' + worker_count = Integer(ENV.fetch('WEB_CONCURRENCY') { Concurrent.physical_processor_count }) workers worker_count if worker_count > 1 end # Specifies the `worker_timeout` threshold that Puma will use to wait before # terminating a worker in development environments. -worker_timeout 3600 if ENV.fetch("RAILS_ENV", "development") == "development" +worker_timeout 3600 if ENV.fetch('RAILS_ENV', 'development') == 'development' # Specifies the `port` that Puma will listen on to receive requests; default is 3000. -port ENV.fetch("PORT") { 3000 } +port ENV.fetch('PORT', 3000) # Specifies the `environment` that Puma will run in. -environment ENV.fetch("RAILS_ENV") { "development" } +environment ENV.fetch('RAILS_ENV', 'development') # Specifies the `pidfile` that Puma will use. -pidfile ENV.fetch("PIDFILE") { "tmp/pids/server.pid" } +pidfile ENV.fetch('PIDFILE', 'tmp/pids/server.pid') # Allow puma to be restarted by `bin/rails restart` command. plugin :tmp_restart diff --git a/config/routes.rb b/config/routes.rb index 02e84b7..a17edb4 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + Rails.application.routes.draw do resources :accreditation_school_lists resources :pmdk_school_lists @@ -29,26 +31,26 @@ get 'password_resets/new' get 'password_resets/edit' get 'sessions/new' - get "/signup", to: 'users#new' - #delete user by its id - delete "users/:id", to: "users#destroy", as: :delete_user - root "static_pages#home" + get '/signup', to: 'users#new' + # delete user by its id + delete 'users/:id', to: 'users#destroy', as: :delete_user + root 'static_pages#home' get '/home', to: 'static_pages#home' get '/help', to: 'static_pages#help' get '/about', to: 'static_pages#about' get '/contact', to: 'static_pages#contact' - #show all registered users - #get '/users', to: 'users#index' - #add REST resources for users + # show all registered users + # get '/users', to: 'users#index' + # add REST resources for users resources :users - #handling sessions - get '/login', to: 'sessions#new' #login page - post 'login', to: 'sessions#create' #create the session - #delete the session - delete '/logout', to: 'sessions#destroy' #delete the session - resources :users do #add following and followers action - member do #member: get the user id - get :following, :followers #get the following and followers, + # handling sessions + get '/login', to: 'sessions#new' # login page + post 'login', to: 'sessions#create' # create the session + # delete the session + delete '/logout', to: 'sessions#destroy' # delete the session + resources :users do # add following and followers action + member do # member: get the user id + get :following, :followers # get the following and followers, # url: /users/1/following and /users/1/followers, # named following_user_path(1) and followers_user_path(1) end @@ -57,31 +59,30 @@ # Reveal health status on /up that returns 200 if the app boots with no exceptions, otherwise 500. # Can be used by load balancers and uptime monitors to verify that the app is live. - get "up" => "rails/health#show", as: :rails_health_check - #root "application#hello" + get 'up' => 'rails/health#show', as: :rails_health_check + # root "application#hello" # Defines the root path route ("/") # root "posts#index" - #define as plural if you have multiple data + # define as plural if you have multiple data resources :account_activations, only: [:edit] - resources :password_resets, only: [:edit, :new, :update, :create] - resources :microposts, only: [:create, :destroy] - resources :relationships, only: [:create, :destroy] - resources :personals, only: [:new, :create, :edit, :update, :show] - resources :parents, only: [:new, :create, :edit, :update, :show] - resources :addresses, only: [:new, :create, :edit, :update, :show] - resources :languages, only: [:new, :create, :edit, :update, :show] - resources :achievements, only: [:new, :create, :edit, :update, :show] - resources :extras, only: [:new, :create, :edit, :update, :show] - resources :organizations, only: [:new, :create, :edit, :update, :show] - resources :sources, only: [:new, :create, :edit, :update, :show] - resources :majors, only: [:new, :create, :edit, :update, :show] - - resources :pmdk_school_informations, only: [:new, :create, :edit, :update, :show] - resources :pmdk_each_score_informations, only: [:new, :create, :edit, :update, :show] - resources :pmdk_total_score_informations, only: [:new, :create, :edit, :update, :show] + resources :password_resets, only: %i[edit new update create] + resources :microposts, only: %i[create destroy] + resources :relationships, only: %i[create destroy] + resources :personals, only: %i[new create edit update show] + resources :parents, only: %i[new create edit update show] + resources :addresses, only: %i[new create edit update show] + resources :languages, only: %i[new create edit update show] + resources :achievements, only: %i[new create edit update show] + resources :extras, only: %i[new create edit update show] + resources :organizations, only: %i[new create edit update show] + resources :sources, only: %i[new create edit update show] + resources :majors, only: %i[new create edit update show] - resources :utbk_scores, only: [:new, :create, :edit, :update, :show] - resources :utbk_school_informations, only: [:new, :create, :edit, :update, :show] - resources :usm_school_informations, only: [:new, :create, :edit, :update, :show] + resources :pmdk_school_informations, only: %i[new create edit update show] + resources :pmdk_each_score_informations, only: %i[new create edit update show] + resources :pmdk_total_score_informations, only: %i[new create edit update show] + resources :utbk_scores, only: %i[new create edit update show] + resources :utbk_school_informations, only: %i[new create edit update show] + resources :usm_school_informations, only: %i[new create edit update show] end diff --git a/db/migrate/20231227033523_create_users.rb b/db/migrate/20231227033523_create_users.rb index 60128d1..494e9e3 100644 --- a/db/migrate/20231227033523_create_users.rb +++ b/db/migrate/20231227033523_create_users.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class CreateUsers < ActiveRecord::Migration[7.1] def change create_table :users do |t| @@ -5,7 +7,6 @@ def change t.string :email t.timestamps - end end end diff --git a/db/migrate/20231228021641_add_index_to_users_email.rb b/db/migrate/20231228021641_add_index_to_users_email.rb index 3b688cc..6bafe0f 100644 --- a/db/migrate/20231228021641_add_index_to_users_email.rb +++ b/db/migrate/20231228021641_add_index_to_users_email.rb @@ -1,6 +1,8 @@ +# frozen_string_literal: true + class AddIndexToUsersEmail < ActiveRecord::Migration[7.1] def change - #add index to users email + # add index to users email add_index :users, :email, unique: true end end diff --git a/db/migrate/20231228030035_add_password_digest_to_users.rb b/db/migrate/20231228030035_add_password_digest_to_users.rb index 1f6befc..66dbf69 100644 --- a/db/migrate/20231228030035_add_password_digest_to_users.rb +++ b/db/migrate/20231228030035_add_password_digest_to_users.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class AddPasswordDigestToUsers < ActiveRecord::Migration[7.1] def change add_column :users, :password_digest, :string diff --git a/db/migrate/20240101073335_add_remember_digest_to_users.rb b/db/migrate/20240101073335_add_remember_digest_to_users.rb index d0dbf65..f5b500e 100644 --- a/db/migrate/20240101073335_add_remember_digest_to_users.rb +++ b/db/migrate/20240101073335_add_remember_digest_to_users.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class AddRememberDigestToUsers < ActiveRecord::Migration[7.1] def change add_column :users, :remember_digest, :string diff --git a/db/migrate/20240108021321_add_admin_to_users.rb b/db/migrate/20240108021321_add_admin_to_users.rb index d590eb9..784b3a2 100644 --- a/db/migrate/20240108021321_add_admin_to_users.rb +++ b/db/migrate/20240108021321_add_admin_to_users.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class AddAdminToUsers < ActiveRecord::Migration[7.1] def change add_column :users, :admin, :boolean, default: false diff --git a/db/migrate/20240108084139_add_activation_to_users.rb b/db/migrate/20240108084139_add_activation_to_users.rb index c3f1e50..217ad69 100644 --- a/db/migrate/20240108084139_add_activation_to_users.rb +++ b/db/migrate/20240108084139_add_activation_to_users.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class AddActivationToUsers < ActiveRecord::Migration[7.1] def change add_column :users, :activation_digest, :string diff --git a/db/migrate/20240110080708_add_reset_to_users.rb b/db/migrate/20240110080708_add_reset_to_users.rb index 4476f89..64f8059 100644 --- a/db/migrate/20240110080708_add_reset_to_users.rb +++ b/db/migrate/20240110080708_add_reset_to_users.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class AddResetToUsers < ActiveRecord::Migration[7.1] def change add_column :users, :reset_digest, :string diff --git a/db/migrate/20240111225930_create_microposts.rb b/db/migrate/20240111225930_create_microposts.rb index 49b7f3b..7eec315 100644 --- a/db/migrate/20240111225930_create_microposts.rb +++ b/db/migrate/20240111225930_create_microposts.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class CreateMicroposts < ActiveRecord::Migration[7.1] def change create_table :microposts do |t| @@ -6,8 +8,8 @@ def change t.timestamps end - #since we expect to retrieve all the micropost associated with a given + # since we expect to retrieve all the micropost associated with a given # user id in reverse order of creation, we need add index to both user_id and created_at - add_index :microposts, [:user_id, :created_at] + add_index :microposts, %i[user_id created_at] end end diff --git a/db/migrate/20240114082734_create_active_storage_tables.active_storage.rb b/db/migrate/20240114082734_create_active_storage_tables.active_storage.rb index e4706aa..4494141 100644 --- a/db/migrate/20240114082734_create_active_storage_tables.active_storage.rb +++ b/db/migrate/20240114082734_create_active_storage_tables.active_storage.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # This migration comes from active_storage (originally 20170806125915) class CreateActiveStorageTables < ActiveRecord::Migration[7.0] def change @@ -19,7 +21,7 @@ def change t.datetime :created_at, null: false end - t.index [ :key ], unique: true + t.index [:key], unique: true end create_table :active_storage_attachments, id: primary_key_type do |t| @@ -33,7 +35,8 @@ def change t.datetime :created_at, null: false end - t.index [ :record_type, :record_id, :name, :blob_id ], name: :index_active_storage_attachments_uniqueness, unique: true + t.index %i[record_type record_id name blob_id], name: :index_active_storage_attachments_uniqueness, + unique: true t.foreign_key :active_storage_blobs, column: :blob_id end @@ -41,17 +44,18 @@ def change t.belongs_to :blob, null: false, index: false, type: foreign_key_type t.string :variation_digest, null: false - t.index [ :blob_id, :variation_digest ], name: :index_active_storage_variant_records_uniqueness, unique: true + t.index %i[blob_id variation_digest], name: :index_active_storage_variant_records_uniqueness, unique: true t.foreign_key :active_storage_blobs, column: :blob_id end end private - def primary_and_foreign_key_types - config = Rails.configuration.generators - setting = config.options[config.orm][:primary_key_type] - primary_key_type = setting || :primary_key - foreign_key_type = setting || :bigint - [primary_key_type, foreign_key_type] - end + + def primary_and_foreign_key_types + config = Rails.configuration.generators + setting = config.options[config.orm][:primary_key_type] + primary_key_type = setting || :primary_key + foreign_key_type = setting || :bigint + [primary_key_type, foreign_key_type] + end end diff --git a/db/migrate/20240115075520_create_relationships.rb b/db/migrate/20240115075520_create_relationships.rb index a03da06..ce299a6 100644 --- a/db/migrate/20240115075520_create_relationships.rb +++ b/db/migrate/20240115075520_create_relationships.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class CreateRelationships < ActiveRecord::Migration[7.1] def change create_table :relationships do |t| @@ -10,6 +12,6 @@ def change add_index :relationships, :follower_id # enforce uniqueness on follower_id, followed_id # so the user can't follow another user more than one - add_index :relationships, [:follower_id, :followed_id], unique: true + add_index :relationships, %i[follower_id followed_id], unique: true end end diff --git a/db/migrate/20240116112720_create_personals.rb b/db/migrate/20240116112720_create_personals.rb index 96d20f7..3849e2a 100644 --- a/db/migrate/20240116112720_create_personals.rb +++ b/db/migrate/20240116112720_create_personals.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class CreatePersonals < ActiveRecord::Migration[7.1] def change create_table :personals do |t| diff --git a/db/migrate/20240116114027_create_parents.rb b/db/migrate/20240116114027_create_parents.rb index 5efaa5a..28fbd1d 100644 --- a/db/migrate/20240116114027_create_parents.rb +++ b/db/migrate/20240116114027_create_parents.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class CreateParents < ActiveRecord::Migration[7.1] def change create_table :parents do |t| diff --git a/db/migrate/20240116133344_create_addresses.rb b/db/migrate/20240116133344_create_addresses.rb index 2568ed9..adfb26a 100644 --- a/db/migrate/20240116133344_create_addresses.rb +++ b/db/migrate/20240116133344_create_addresses.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class CreateAddresses < ActiveRecord::Migration[7.1] def change create_table :addresses do |t| diff --git a/db/migrate/20240116134248_remove_whatsapp_from_personal.rb b/db/migrate/20240116134248_remove_whatsapp_from_personal.rb index 96308ff..51d6824 100644 --- a/db/migrate/20240116134248_remove_whatsapp_from_personal.rb +++ b/db/migrate/20240116134248_remove_whatsapp_from_personal.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class RemoveWhatsappFromPersonal < ActiveRecord::Migration[7.1] def change remove_column :personals, :whatsapp, :string diff --git a/db/migrate/20240116134917_add_user_ref_to_personal.rb b/db/migrate/20240116134917_add_user_ref_to_personal.rb index 090492b..b290cd9 100644 --- a/db/migrate/20240116134917_add_user_ref_to_personal.rb +++ b/db/migrate/20240116134917_add_user_ref_to_personal.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class AddUserRefToPersonal < ActiveRecord::Migration[7.1] def change add_reference :personals, :user, null: false, foreign_key: true diff --git a/db/migrate/20240116135049_add_user_ref_to_address.rb b/db/migrate/20240116135049_add_user_ref_to_address.rb index e37c3af..7fad6a4 100644 --- a/db/migrate/20240116135049_add_user_ref_to_address.rb +++ b/db/migrate/20240116135049_add_user_ref_to_address.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class AddUserRefToAddress < ActiveRecord::Migration[7.1] def change add_reference :addresses, :user, null: false, foreign_key: true diff --git a/db/migrate/20240116135105_add_user_ref_to_parent.rb b/db/migrate/20240116135105_add_user_ref_to_parent.rb index 57960a3..e044b4a 100644 --- a/db/migrate/20240116135105_add_user_ref_to_parent.rb +++ b/db/migrate/20240116135105_add_user_ref_to_parent.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class AddUserRefToParent < ActiveRecord::Migration[7.1] def change add_reference :parents, :user, null: false, foreign_key: true diff --git a/db/migrate/20240116141326_create_achievements.rb b/db/migrate/20240116141326_create_achievements.rb index 284ebd5..a6a8d7b 100644 --- a/db/migrate/20240116141326_create_achievements.rb +++ b/db/migrate/20240116141326_create_achievements.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class CreateAchievements < ActiveRecord::Migration[7.1] def change create_table :achievements do |t| diff --git a/db/migrate/20240116141438_add_user_ref_to_achievement.rb b/db/migrate/20240116141438_add_user_ref_to_achievement.rb index cb65a0a..fc17c10 100644 --- a/db/migrate/20240116141438_add_user_ref_to_achievement.rb +++ b/db/migrate/20240116141438_add_user_ref_to_achievement.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class AddUserRefToAchievement < ActiveRecord::Migration[7.1] def change add_reference :achievements, :user, null: false, foreign_key: true diff --git a/db/migrate/20240116144446_create_languages.rb b/db/migrate/20240116144446_create_languages.rb index d860925..4c899a2 100644 --- a/db/migrate/20240116144446_create_languages.rb +++ b/db/migrate/20240116144446_create_languages.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class CreateLanguages < ActiveRecord::Migration[7.1] def change create_table :languages do |t| diff --git a/db/migrate/20240116144632_add_user_ref_to_language.rb b/db/migrate/20240116144632_add_user_ref_to_language.rb index e59eeec..ba058a4 100644 --- a/db/migrate/20240116144632_add_user_ref_to_language.rb +++ b/db/migrate/20240116144632_add_user_ref_to_language.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class AddUserRefToLanguage < ActiveRecord::Migration[7.1] def change add_reference :languages, :user, null: false, foreign_key: true diff --git a/db/migrate/20240116145332_create_sources.rb b/db/migrate/20240116145332_create_sources.rb index f59a0a8..4cbcec1 100644 --- a/db/migrate/20240116145332_create_sources.rb +++ b/db/migrate/20240116145332_create_sources.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class CreateSources < ActiveRecord::Migration[7.1] def change create_table :sources do |t| diff --git a/db/migrate/20240116145423_add_user_ref_to_source.rb b/db/migrate/20240116145423_add_user_ref_to_source.rb index 0ed8718..a42594b 100644 --- a/db/migrate/20240116145423_add_user_ref_to_source.rb +++ b/db/migrate/20240116145423_add_user_ref_to_source.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class AddUserRefToSource < ActiveRecord::Migration[7.1] def change add_reference :sources, :user, null: false, foreign_key: true diff --git a/db/migrate/20240116145807_create_extras.rb b/db/migrate/20240116145807_create_extras.rb index 82a7c63..efc5c86 100644 --- a/db/migrate/20240116145807_create_extras.rb +++ b/db/migrate/20240116145807_create_extras.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class CreateExtras < ActiveRecord::Migration[7.1] def change create_table :extras do |t| diff --git a/db/migrate/20240116145836_add_user_ref_to_extra.rb b/db/migrate/20240116145836_add_user_ref_to_extra.rb index 8f93308..cfdd35a 100644 --- a/db/migrate/20240116145836_add_user_ref_to_extra.rb +++ b/db/migrate/20240116145836_add_user_ref_to_extra.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class AddUserRefToExtra < ActiveRecord::Migration[7.1] def change add_reference :extras, :user, null: false, foreign_key: true diff --git a/db/migrate/20240116150136_create_organizations.rb b/db/migrate/20240116150136_create_organizations.rb index ff0b9e8..3a11e97 100644 --- a/db/migrate/20240116150136_create_organizations.rb +++ b/db/migrate/20240116150136_create_organizations.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class CreateOrganizations < ActiveRecord::Migration[7.1] def change create_table :organizations do |t| diff --git a/db/migrate/20240116150201_add_user_ref_to_organization.rb b/db/migrate/20240116150201_add_user_ref_to_organization.rb index de775a1..eb5e151 100644 --- a/db/migrate/20240116150201_add_user_ref_to_organization.rb +++ b/db/migrate/20240116150201_add_user_ref_to_organization.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class AddUserRefToOrganization < ActiveRecord::Migration[7.1] def change add_reference :organizations, :user, null: false, foreign_key: true diff --git a/db/migrate/20240116150625_create_costs.rb b/db/migrate/20240116150625_create_costs.rb index 48e2fb2..24dba52 100644 --- a/db/migrate/20240116150625_create_costs.rb +++ b/db/migrate/20240116150625_create_costs.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class CreateCosts < ActiveRecord::Migration[7.1] def change create_table :costs do |t| diff --git a/db/migrate/20240116150643_add_user_ref_to_cost.rb b/db/migrate/20240116150643_add_user_ref_to_cost.rb index d98ed11..57c6af8 100644 --- a/db/migrate/20240116150643_add_user_ref_to_cost.rb +++ b/db/migrate/20240116150643_add_user_ref_to_cost.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class AddUserRefToCost < ActiveRecord::Migration[7.1] def change add_reference :costs, :user, null: false, foreign_key: true diff --git a/db/migrate/20240117001338_create_source_motivation_lists.rb b/db/migrate/20240117001338_create_source_motivation_lists.rb index c24378a..15f5a9e 100644 --- a/db/migrate/20240117001338_create_source_motivation_lists.rb +++ b/db/migrate/20240117001338_create_source_motivation_lists.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class CreateSourceMotivationLists < ActiveRecord::Migration[7.1] def change create_table :source_motivation_lists do |t| diff --git a/db/migrate/20240117002444_create_source_information_lists.rb b/db/migrate/20240117002444_create_source_information_lists.rb index bfd0d65..3c77f89 100644 --- a/db/migrate/20240117002444_create_source_information_lists.rb +++ b/db/migrate/20240117002444_create_source_information_lists.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class CreateSourceInformationLists < ActiveRecord::Migration[7.1] def change create_table :source_information_lists do |t| diff --git a/db/migrate/20240117002739_create_cost_vourcher_lists.rb b/db/migrate/20240117002739_create_cost_vourcher_lists.rb index e3b2be2..690fb92 100644 --- a/db/migrate/20240117002739_create_cost_vourcher_lists.rb +++ b/db/migrate/20240117002739_create_cost_vourcher_lists.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class CreateCostVourcherLists < ActiveRecord::Migration[7.1] def change create_table :cost_vourcher_lists do |t| diff --git a/db/migrate/20240117002934_create_cost_lists.rb b/db/migrate/20240117002934_create_cost_lists.rb index 2acbee7..861ada1 100644 --- a/db/migrate/20240117002934_create_cost_lists.rb +++ b/db/migrate/20240117002934_create_cost_lists.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class CreateCostLists < ActiveRecord::Migration[7.1] def change create_table :cost_lists do |t| diff --git a/db/migrate/20240117003323_create_extra_lists.rb b/db/migrate/20240117003323_create_extra_lists.rb index 953bbf7..df7d47f 100644 --- a/db/migrate/20240117003323_create_extra_lists.rb +++ b/db/migrate/20240117003323_create_extra_lists.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class CreateExtraLists < ActiveRecord::Migration[7.1] def change create_table :extra_lists do |t| diff --git a/db/migrate/20240117003435_create_language_name_lists.rb b/db/migrate/20240117003435_create_language_name_lists.rb index d1d96be..0772940 100644 --- a/db/migrate/20240117003435_create_language_name_lists.rb +++ b/db/migrate/20240117003435_create_language_name_lists.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class CreateLanguageNameLists < ActiveRecord::Migration[7.1] def change create_table :language_name_lists do |t| diff --git a/db/migrate/20240117003533_create_language_degree_lists.rb b/db/migrate/20240117003533_create_language_degree_lists.rb index acabf0c..954f28b 100644 --- a/db/migrate/20240117003533_create_language_degree_lists.rb +++ b/db/migrate/20240117003533_create_language_degree_lists.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class CreateLanguageDegreeLists < ActiveRecord::Migration[7.1] def change create_table :language_degree_lists do |t| diff --git a/db/migrate/20240117003654_create_organization_degree_lists.rb b/db/migrate/20240117003654_create_organization_degree_lists.rb index d9fd427..8152ad3 100644 --- a/db/migrate/20240117003654_create_organization_degree_lists.rb +++ b/db/migrate/20240117003654_create_organization_degree_lists.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class CreateOrganizationDegreeLists < ActiveRecord::Migration[7.1] def change create_table :organization_degree_lists do |t| diff --git a/db/migrate/20240117033057_create_majors.rb b/db/migrate/20240117033057_create_majors.rb index 862aa63..8cb9514 100644 --- a/db/migrate/20240117033057_create_majors.rb +++ b/db/migrate/20240117033057_create_majors.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class CreateMajors < ActiveRecord::Migration[7.1] def change create_table :majors do |t| diff --git a/db/migrate/20240117033205_add_user_ref_to_major.rb b/db/migrate/20240117033205_add_user_ref_to_major.rb index 58790c3..6b6b955 100644 --- a/db/migrate/20240117033205_add_user_ref_to_major.rb +++ b/db/migrate/20240117033205_add_user_ref_to_major.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class AddUserRefToMajor < ActiveRecord::Migration[7.1] def change add_reference :majors, :user, null: false, foreign_key: true diff --git a/db/migrate/20240123014103_create_major_lists.rb b/db/migrate/20240123014103_create_major_lists.rb index 7c4d786..fdd1002 100644 --- a/db/migrate/20240123014103_create_major_lists.rb +++ b/db/migrate/20240123014103_create_major_lists.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class CreateMajorLists < ActiveRecord::Migration[7.1] def change create_table :major_lists do |t| diff --git a/db/migrate/20240123021642_create_high_school_majors.rb b/db/migrate/20240123021642_create_high_school_majors.rb index cdd8629..0ee76be 100644 --- a/db/migrate/20240123021642_create_high_school_majors.rb +++ b/db/migrate/20240123021642_create_high_school_majors.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class CreateHighSchoolMajors < ActiveRecord::Migration[7.1] def change create_table :high_school_majors do |t| diff --git a/db/migrate/20240123033730_create_parent_job_lists.rb b/db/migrate/20240123033730_create_parent_job_lists.rb index ac620a0..319ead5 100644 --- a/db/migrate/20240123033730_create_parent_job_lists.rb +++ b/db/migrate/20240123033730_create_parent_job_lists.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class CreateParentJobLists < ActiveRecord::Migration[7.1] def change create_table :parent_job_lists do |t| diff --git a/db/migrate/20240123040009_create_parent_education_lists.rb b/db/migrate/20240123040009_create_parent_education_lists.rb index 9ce56d2..39c3983 100644 --- a/db/migrate/20240123040009_create_parent_education_lists.rb +++ b/db/migrate/20240123040009_create_parent_education_lists.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class CreateParentEducationLists < ActiveRecord::Migration[7.1] def change create_table :parent_education_lists do |t| diff --git a/db/migrate/20240123041849_create_personal_gender_lists.rb b/db/migrate/20240123041849_create_personal_gender_lists.rb index 07a631e..e5e2264 100644 --- a/db/migrate/20240123041849_create_personal_gender_lists.rb +++ b/db/migrate/20240123041849_create_personal_gender_lists.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class CreatePersonalGenderLists < ActiveRecord::Migration[7.1] def change create_table :personal_gender_lists do |t| diff --git a/db/migrate/20240123041957_create_personal_religion_lists.rb b/db/migrate/20240123041957_create_personal_religion_lists.rb index 0798285..3fa9027 100644 --- a/db/migrate/20240123041957_create_personal_religion_lists.rb +++ b/db/migrate/20240123041957_create_personal_religion_lists.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class CreatePersonalReligionLists < ActiveRecord::Migration[7.1] def change create_table :personal_religion_lists do |t| diff --git a/db/migrate/20240123231407_create_batch_lists.rb b/db/migrate/20240123231407_create_batch_lists.rb index 23fbc65..9be82c7 100644 --- a/db/migrate/20240123231407_create_batch_lists.rb +++ b/db/migrate/20240123231407_create_batch_lists.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class CreateBatchLists < ActiveRecord::Migration[7.1] def change create_table :batch_lists do |t| diff --git a/db/migrate/20240124014244_create_achievement_tingkat_lists.rb b/db/migrate/20240124014244_create_achievement_tingkat_lists.rb index 01a271d..438c61d 100644 --- a/db/migrate/20240124014244_create_achievement_tingkat_lists.rb +++ b/db/migrate/20240124014244_create_achievement_tingkat_lists.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class CreateAchievementTingkatLists < ActiveRecord::Migration[7.1] def change create_table :achievement_tingkat_lists do |t| diff --git a/db/migrate/20240124014337_create_achievement_kategori_lists.rb b/db/migrate/20240124014337_create_achievement_kategori_lists.rb index 4bc066e..89eff52 100644 --- a/db/migrate/20240124014337_create_achievement_kategori_lists.rb +++ b/db/migrate/20240124014337_create_achievement_kategori_lists.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class CreateAchievementKategoriLists < ActiveRecord::Migration[7.1] def change create_table :achievement_kategori_lists do |t| diff --git a/db/migrate/20240124023554_create_address_province_lists.rb b/db/migrate/20240124023554_create_address_province_lists.rb index 62b7343..bd70da6 100644 --- a/db/migrate/20240124023554_create_address_province_lists.rb +++ b/db/migrate/20240124023554_create_address_province_lists.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class CreateAddressProvinceLists < ActiveRecord::Migration[7.1] def change create_table :address_province_lists do |t| diff --git a/db/migrate/20240124025248_create_address_kabupaten_lists.rb b/db/migrate/20240124025248_create_address_kabupaten_lists.rb index a8ef32d..f6f5269 100644 --- a/db/migrate/20240124025248_create_address_kabupaten_lists.rb +++ b/db/migrate/20240124025248_create_address_kabupaten_lists.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class CreateAddressKabupatenLists < ActiveRecord::Migration[7.1] def change create_table :address_kabupaten_lists do |t| diff --git a/db/migrate/20240124025321_create_address_kecamatan_lists.rb b/db/migrate/20240124025321_create_address_kecamatan_lists.rb index d7ccde2..db765bd 100644 --- a/db/migrate/20240124025321_create_address_kecamatan_lists.rb +++ b/db/migrate/20240124025321_create_address_kecamatan_lists.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class CreateAddressKecamatanLists < ActiveRecord::Migration[7.1] def change create_table :address_kecamatan_lists do |t| diff --git a/db/migrate/20240124030807_add_address_provinsi_list_ref_to_address_kecamatan_list.rb b/db/migrate/20240124030807_add_address_provinsi_list_ref_to_address_kecamatan_list.rb index bb674c4..0a56bbf 100644 --- a/db/migrate/20240124030807_add_address_provinsi_list_ref_to_address_kecamatan_list.rb +++ b/db/migrate/20240124030807_add_address_provinsi_list_ref_to_address_kecamatan_list.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class AddAddressProvinsiListRefToAddressKecamatanList < ActiveRecord::Migration[7.1] def change add_reference :address_kecamatan_lists, :address_province_list, null: false, foreign_key: true diff --git a/db/migrate/20240124030936_add_address_kecamatan_list_ref_to_address_kabupaten_list.rb b/db/migrate/20240124030936_add_address_kecamatan_list_ref_to_address_kabupaten_list.rb index 185e1ee..f7dcc1d 100644 --- a/db/migrate/20240124030936_add_address_kecamatan_list_ref_to_address_kabupaten_list.rb +++ b/db/migrate/20240124030936_add_address_kecamatan_list_ref_to_address_kabupaten_list.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class AddAddressKecamatanListRefToAddressKabupatenList < ActiveRecord::Migration[7.1] def change add_reference :address_kabupaten_lists, :address_kecamatan_list, null: false, foreign_key: true diff --git a/db/migrate/20240124070753_create_all_school_lists.rb b/db/migrate/20240124070753_create_all_school_lists.rb index 8438743..3a8cc91 100644 --- a/db/migrate/20240124070753_create_all_school_lists.rb +++ b/db/migrate/20240124070753_create_all_school_lists.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class CreateAllSchoolLists < ActiveRecord::Migration[7.1] def change create_table :all_school_lists do |t| diff --git a/db/migrate/20240124070830_create_pmdk_school_lists.rb b/db/migrate/20240124070830_create_pmdk_school_lists.rb index a29f9c7..00970d4 100644 --- a/db/migrate/20240124070830_create_pmdk_school_lists.rb +++ b/db/migrate/20240124070830_create_pmdk_school_lists.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class CreatePmdkSchoolLists < ActiveRecord::Migration[7.1] def change create_table :pmdk_school_lists do |t| diff --git a/db/migrate/20240124071057_create_accreditation_school_lists.rb b/db/migrate/20240124071057_create_accreditation_school_lists.rb index 2cdd1ea..9c80fcb 100644 --- a/db/migrate/20240124071057_create_accreditation_school_lists.rb +++ b/db/migrate/20240124071057_create_accreditation_school_lists.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class CreateAccreditationSchoolLists < ActiveRecord::Migration[7.1] def change create_table :accreditation_school_lists do |t| diff --git a/db/migrate/20240124100843_add_address_provinsi_list_ref_to_address_kabupaten_list.rb b/db/migrate/20240124100843_add_address_provinsi_list_ref_to_address_kabupaten_list.rb index e993113..f67b39d 100644 --- a/db/migrate/20240124100843_add_address_provinsi_list_ref_to_address_kabupaten_list.rb +++ b/db/migrate/20240124100843_add_address_provinsi_list_ref_to_address_kabupaten_list.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class AddAddressProvinsiListRefToAddressKabupatenList < ActiveRecord::Migration[7.1] def change add_reference :address_kabupaten_lists, :address_province_list, null: false, foreign_key: true diff --git a/db/migrate/20240124101005_add_address_kabupaten_list_ref_to_address_kecamatan_list.rb b/db/migrate/20240124101005_add_address_kabupaten_list_ref_to_address_kecamatan_list.rb index 31cbaf8..65759de 100644 --- a/db/migrate/20240124101005_add_address_kabupaten_list_ref_to_address_kecamatan_list.rb +++ b/db/migrate/20240124101005_add_address_kabupaten_list_ref_to_address_kecamatan_list.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class AddAddressKabupatenListRefToAddressKecamatanList < ActiveRecord::Migration[7.1] def change add_reference :address_kecamatan_lists, :address_kabupaten_list, null: false, foreign_key: true diff --git a/db/migrate/20240124101210_remove_address_provinsi_list_ref_to_address_kecamatan_list.rb b/db/migrate/20240124101210_remove_address_provinsi_list_ref_to_address_kecamatan_list.rb index 8138106..2fd8eab 100644 --- a/db/migrate/20240124101210_remove_address_provinsi_list_ref_to_address_kecamatan_list.rb +++ b/db/migrate/20240124101210_remove_address_provinsi_list_ref_to_address_kecamatan_list.rb @@ -1,4 +1,5 @@ +# frozen_string_literal: true + class RemoveAddressProvinsiListRefToAddressKecamatanList < ActiveRecord::Migration[7.1] - def change - end + def change; end end diff --git a/db/migrate/20240124101647_remove_address_provinsi_list_ref_from_address_kecamatan_list.rb b/db/migrate/20240124101647_remove_address_provinsi_list_ref_from_address_kecamatan_list.rb index 9bace72..0a7f298 100644 --- a/db/migrate/20240124101647_remove_address_provinsi_list_ref_from_address_kecamatan_list.rb +++ b/db/migrate/20240124101647_remove_address_provinsi_list_ref_from_address_kecamatan_list.rb @@ -1,4 +1,5 @@ +# frozen_string_literal: true + class RemoveAddressProvinsiListRefFromAddressKecamatanList < ActiveRecord::Migration[7.1] - def change - end + def change; end end diff --git a/db/migrate/20240124101838_remove_address_province_list_ref_from_address_kecamatan_list.rb b/db/migrate/20240124101838_remove_address_province_list_ref_from_address_kecamatan_list.rb index 0e0f100..5edd94e 100644 --- a/db/migrate/20240124101838_remove_address_province_list_ref_from_address_kecamatan_list.rb +++ b/db/migrate/20240124101838_remove_address_province_list_ref_from_address_kecamatan_list.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class RemoveAddressProvinceListRefFromAddressKecamatanList < ActiveRecord::Migration[7.1] def change remove_reference :address_kecamatan_lists, :address_province_list, index: true, foreign_key: true diff --git a/db/migrate/20240124102935_remove_address_kecamatan_list_ref_from_address_kabupaten_list.rb b/db/migrate/20240124102935_remove_address_kecamatan_list_ref_from_address_kabupaten_list.rb index cba68d8..8f682d8 100644 --- a/db/migrate/20240124102935_remove_address_kecamatan_list_ref_from_address_kabupaten_list.rb +++ b/db/migrate/20240124102935_remove_address_kecamatan_list_ref_from_address_kabupaten_list.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class RemoveAddressKecamatanListRefFromAddressKabupatenList < ActiveRecord::Migration[7.1] def change remove_reference :address_kabupaten_lists, diff --git a/db/migrate/20240125022622_create_pmdk_school_informations.rb b/db/migrate/20240125022622_create_pmdk_school_informations.rb index 919b342..87a4b88 100644 --- a/db/migrate/20240125022622_create_pmdk_school_informations.rb +++ b/db/migrate/20240125022622_create_pmdk_school_informations.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class CreatePmdkSchoolInformations < ActiveRecord::Migration[7.1] def change create_table :pmdk_school_informations do |t| diff --git a/db/migrate/20240125023412_add_user_ref_to_pmdk_school_information.rb b/db/migrate/20240125023412_add_user_ref_to_pmdk_school_information.rb index b85eeea..3e55218 100644 --- a/db/migrate/20240125023412_add_user_ref_to_pmdk_school_information.rb +++ b/db/migrate/20240125023412_add_user_ref_to_pmdk_school_information.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class AddUserRefToPmdkSchoolInformation < ActiveRecord::Migration[7.1] def change add_reference :pmdk_school_informations, :user, null: false, foreign_key: true diff --git a/db/migrate/20240125024340_create_pmdk_total_score_informations.rb b/db/migrate/20240125024340_create_pmdk_total_score_informations.rb index 746d618..2826a27 100644 --- a/db/migrate/20240125024340_create_pmdk_total_score_informations.rb +++ b/db/migrate/20240125024340_create_pmdk_total_score_informations.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class CreatePmdkTotalScoreInformations < ActiveRecord::Migration[7.1] def change create_table :pmdk_total_score_informations do |t| diff --git a/db/migrate/20240125024622_add_user_ref_to_pmdk_total_score_information.rb b/db/migrate/20240125024622_add_user_ref_to_pmdk_total_score_information.rb index 8199913..ca3ff49 100644 --- a/db/migrate/20240125024622_add_user_ref_to_pmdk_total_score_information.rb +++ b/db/migrate/20240125024622_add_user_ref_to_pmdk_total_score_information.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class AddUserRefToPmdkTotalScoreInformation < ActiveRecord::Migration[7.1] def change add_reference :pmdk_total_score_informations, :user, null: false, foreign_key: true diff --git a/db/migrate/20240125025003_create_pmdk_each_score_informations.rb b/db/migrate/20240125025003_create_pmdk_each_score_informations.rb index dd58485..5a78a56 100644 --- a/db/migrate/20240125025003_create_pmdk_each_score_informations.rb +++ b/db/migrate/20240125025003_create_pmdk_each_score_informations.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class CreatePmdkEachScoreInformations < ActiveRecord::Migration[7.1] def change create_table :pmdk_each_score_informations do |t| diff --git a/db/migrate/20240125025449_add_user_ref_to_pmdk_each_score_information.rb b/db/migrate/20240125025449_add_user_ref_to_pmdk_each_score_information.rb index 6933058..c1bb262 100644 --- a/db/migrate/20240125025449_add_user_ref_to_pmdk_each_score_information.rb +++ b/db/migrate/20240125025449_add_user_ref_to_pmdk_each_score_information.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class AddUserRefToPmdkEachScoreInformation < ActiveRecord::Migration[7.1] def change add_reference :pmdk_each_score_informations, :user, null: false, foreign_key: true diff --git a/db/migrate/20240125034604_create_utbk_scores.rb b/db/migrate/20240125034604_create_utbk_scores.rb index 93b1229..252c13a 100644 --- a/db/migrate/20240125034604_create_utbk_scores.rb +++ b/db/migrate/20240125034604_create_utbk_scores.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class CreateUtbkScores < ActiveRecord::Migration[7.1] def change create_table :utbk_scores do |t| diff --git a/db/migrate/20240125035257_add_user_ref_to_utbk_score.rb b/db/migrate/20240125035257_add_user_ref_to_utbk_score.rb index 8d17518..8fcaa5c 100644 --- a/db/migrate/20240125035257_add_user_ref_to_utbk_score.rb +++ b/db/migrate/20240125035257_add_user_ref_to_utbk_score.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class AddUserRefToUtbkScore < ActiveRecord::Migration[7.1] def change add_reference :utbk_scores, :user, null: false, foreign_key: true diff --git a/db/migrate/20240125035421_create_utbk_school_informations.rb b/db/migrate/20240125035421_create_utbk_school_informations.rb index 30d9aaf..f394712 100644 --- a/db/migrate/20240125035421_create_utbk_school_informations.rb +++ b/db/migrate/20240125035421_create_utbk_school_informations.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class CreateUtbkSchoolInformations < ActiveRecord::Migration[7.1] def change create_table :utbk_school_informations do |t| diff --git a/db/migrate/20240125035732_add_user_ref_to_utbk_school_information.rb b/db/migrate/20240125035732_add_user_ref_to_utbk_school_information.rb index cabfbef..3cdab2d 100644 --- a/db/migrate/20240125035732_add_user_ref_to_utbk_school_information.rb +++ b/db/migrate/20240125035732_add_user_ref_to_utbk_school_information.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class AddUserRefToUtbkSchoolInformation < ActiveRecord::Migration[7.1] def change add_reference :utbk_school_informations, :user, null: false, foreign_key: true diff --git a/db/migrate/20240126084849_create_usm_school_informations.rb b/db/migrate/20240126084849_create_usm_school_informations.rb index 0035498..1cf84d0 100644 --- a/db/migrate/20240126084849_create_usm_school_informations.rb +++ b/db/migrate/20240126084849_create_usm_school_informations.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class CreateUsmSchoolInformations < ActiveRecord::Migration[7.1] def change create_table :usm_school_informations do |t| diff --git a/db/migrate/20240126085158_add_user_ref_to_usm_school_information.rb b/db/migrate/20240126085158_add_user_ref_to_usm_school_information.rb index 84151c4..c1622b2 100644 --- a/db/migrate/20240126085158_add_user_ref_to_usm_school_information.rb +++ b/db/migrate/20240126085158_add_user_ref_to_usm_school_information.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class AddUserRefToUsmSchoolInformation < ActiveRecord::Migration[7.1] def change add_reference :usm_school_informations, :user, null: false, foreign_key: true diff --git a/db/migrate/20240126221733_add_jurusan_sekolah_to_pmdk_school_information.rb b/db/migrate/20240126221733_add_jurusan_sekolah_to_pmdk_school_information.rb index bed98d2..f747302 100644 --- a/db/migrate/20240126221733_add_jurusan_sekolah_to_pmdk_school_information.rb +++ b/db/migrate/20240126221733_add_jurusan_sekolah_to_pmdk_school_information.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class AddJurusanSekolahToPmdkSchoolInformation < ActiveRecord::Migration[7.1] def change add_column :pmdk_school_informations, :jurusan_sekolah, :string diff --git a/db/migrate/20240126221827_add_jurusan_sekolah_to_utbk_school_information.rb b/db/migrate/20240126221827_add_jurusan_sekolah_to_utbk_school_information.rb index d69c51e..c2c5cdc 100644 --- a/db/migrate/20240126221827_add_jurusan_sekolah_to_utbk_school_information.rb +++ b/db/migrate/20240126221827_add_jurusan_sekolah_to_utbk_school_information.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class AddJurusanSekolahToUtbkSchoolInformation < ActiveRecord::Migration[7.1] def change add_column :utbk_school_informations, :jurusan_sekolah, :string diff --git a/db/migrate/20240130042157_change_jumlah_nilai_un_from_usm_school_information.rb b/db/migrate/20240130042157_change_jumlah_nilai_un_from_usm_school_information.rb index a0edfa5..75970e0 100644 --- a/db/migrate/20240130042157_change_jumlah_nilai_un_from_usm_school_information.rb +++ b/db/migrate/20240130042157_change_jumlah_nilai_un_from_usm_school_information.rb @@ -1,4 +1,5 @@ +# frozen_string_literal: true + class ChangeJumlahNilaiUnFromUsmSchoolInformation < ActiveRecord::Migration[7.1] - def change - end + def change; end end diff --git a/db/migrate/20240130042500_change_jumlah_pelajaran_un_from_usm_school_information.rb b/db/migrate/20240130042500_change_jumlah_pelajaran_un_from_usm_school_information.rb index 2387f22..56ddaed 100644 --- a/db/migrate/20240130042500_change_jumlah_pelajaran_un_from_usm_school_information.rb +++ b/db/migrate/20240130042500_change_jumlah_pelajaran_un_from_usm_school_information.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class ChangeJumlahPelajaranUnFromUsmSchoolInformation < ActiveRecord::Migration[7.1] def change change_column :usm_school_informations, :jumlah_pelajaran_un, diff --git a/db/migrate/20240130042648_change_jumlah_pelajaran_semester_from_usm_school_information.rb b/db/migrate/20240130042648_change_jumlah_pelajaran_semester_from_usm_school_information.rb index c0faeaa..7188dae 100644 --- a/db/migrate/20240130042648_change_jumlah_pelajaran_semester_from_usm_school_information.rb +++ b/db/migrate/20240130042648_change_jumlah_pelajaran_semester_from_usm_school_information.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class ChangeJumlahPelajaranSemesterFromUsmSchoolInformation < ActiveRecord::Migration[7.1] def change change_column :usm_school_informations, :jumlah_pelajaran_semester_5, diff --git a/db/migrate/20240130042855_change_jumlah_pelajaran_un_from_utbk_school_information.rb b/db/migrate/20240130042855_change_jumlah_pelajaran_un_from_utbk_school_information.rb index 4a0ab07..17a458b 100644 --- a/db/migrate/20240130042855_change_jumlah_pelajaran_un_from_utbk_school_information.rb +++ b/db/migrate/20240130042855_change_jumlah_pelajaran_un_from_utbk_school_information.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class ChangeJumlahPelajaranUnFromUtbkSchoolInformation < ActiveRecord::Migration[7.1] def change change_column :utbk_school_informations, :jumlah_pelajaran_un, diff --git a/db/migrate/20240130043001_change_jumlah_pelajaran_un_from_pmdk_school_information.rb b/db/migrate/20240130043001_change_jumlah_pelajaran_un_from_pmdk_school_information.rb index ebed866..b4a2afb 100644 --- a/db/migrate/20240130043001_change_jumlah_pelajaran_un_from_pmdk_school_information.rb +++ b/db/migrate/20240130043001_change_jumlah_pelajaran_un_from_pmdk_school_information.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class ChangeJumlahPelajaranUnFromPmdkSchoolInformation < ActiveRecord::Migration[7.1] def change change_column :pmdk_school_informations, :jumlah_pelajaran_un, diff --git a/db/migrate/20240130043242_change_jumlah_pelajaran_from_pmdk_total_score.rb b/db/migrate/20240130043242_change_jumlah_pelajaran_from_pmdk_total_score.rb index 8b754f7..feaeb05 100644 --- a/db/migrate/20240130043242_change_jumlah_pelajaran_from_pmdk_total_score.rb +++ b/db/migrate/20240130043242_change_jumlah_pelajaran_from_pmdk_total_score.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class ChangeJumlahPelajaranFromPmdkTotalScore < ActiveRecord::Migration[7.1] def change change_column :pmdk_total_score_informations, :jumlah_pelajaran_semester_5, diff --git a/db/migrate/20240131042931_change_jumlah_pelajaran_semester_from_utbk_score.rb b/db/migrate/20240131042931_change_jumlah_pelajaran_semester_from_utbk_score.rb index fad8102..8c0eb8e 100644 --- a/db/migrate/20240131042931_change_jumlah_pelajaran_semester_from_utbk_score.rb +++ b/db/migrate/20240131042931_change_jumlah_pelajaran_semester_from_utbk_score.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class ChangeJumlahPelajaranSemesterFromUtbkScore < ActiveRecord::Migration[7.1] def change change_column :utbk_scores, :jumlah_pelajaran_semester_6, :integer diff --git a/db/schema.rb b/db/schema.rb index fe8f0b1..c862d71 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # This file is auto-generated from the current state of the database. Instead # of editing this file, please use the migrations feature of Active Record to # incrementally modify your database, and then regenerate this schema definition. @@ -10,451 +12,452 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema[7.1].define(version: 2024_01_31_042931) do - create_table "accreditation_school_lists", force: :cascade do |t| - t.string "akreditasi" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - end +ActiveRecord::Schema[7.1].define(version: 20_240_131_042_931) do + create_table 'accreditation_school_lists', force: :cascade do |t| + t.string 'akreditasi' + t.datetime 'created_at', null: false + t.datetime 'updated_at', null: false + end + + create_table 'achievement_kategori_lists', force: :cascade do |t| + t.string 'kategori' + t.datetime 'created_at', null: false + t.datetime 'updated_at', null: false + end - create_table "achievement_kategori_lists", force: :cascade do |t| - t.string "kategori" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + create_table 'achievement_tingkat_lists', force: :cascade do |t| + t.string 'tingkat' + t.datetime 'created_at', null: false + t.datetime 'updated_at', null: false end - create_table "achievement_tingkat_lists", force: :cascade do |t| - t.string "tingkat" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - end - - create_table "achievements", force: :cascade do |t| - t.string "nama_prestasi" - t.date "tahun" - t.string "tingkat" - t.string "kategori" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.integer "user_id", null: false - t.index ["user_id"], name: "index_achievements_on_user_id" + create_table 'achievements', force: :cascade do |t| + t.string 'nama_prestasi' + t.date 'tahun' + t.string 'tingkat' + t.string 'kategori' + t.datetime 'created_at', null: false + t.datetime 'updated_at', null: false + t.integer 'user_id', null: false + t.index ['user_id'], name: 'index_achievements_on_user_id' + end + + create_table 'active_storage_attachments', force: :cascade do |t| + t.string 'name', null: false + t.string 'record_type', null: false + t.bigint 'record_id', null: false + t.bigint 'blob_id', null: false + t.datetime 'created_at', null: false + t.index ['blob_id'], name: 'index_active_storage_attachments_on_blob_id' + t.index %w[record_type record_id name blob_id], name: 'index_active_storage_attachments_uniqueness', + unique: true end - create_table "active_storage_attachments", force: :cascade do |t| - t.string "name", null: false - t.string "record_type", null: false - t.bigint "record_id", null: false - t.bigint "blob_id", null: false - t.datetime "created_at", null: false - t.index ["blob_id"], name: "index_active_storage_attachments_on_blob_id" - t.index ["record_type", "record_id", "name", "blob_id"], name: "index_active_storage_attachments_uniqueness", unique: true + create_table 'active_storage_blobs', force: :cascade do |t| + t.string 'key', null: false + t.string 'filename', null: false + t.string 'content_type' + t.text 'metadata' + t.string 'service_name', null: false + t.bigint 'byte_size', null: false + t.string 'checksum' + t.datetime 'created_at', null: false + t.index ['key'], name: 'index_active_storage_blobs_on_key', unique: true + end + + create_table 'active_storage_variant_records', force: :cascade do |t| + t.bigint 'blob_id', null: false + t.string 'variation_digest', null: false + t.index %w[blob_id variation_digest], name: 'index_active_storage_variant_records_uniqueness', unique: true end - - create_table "active_storage_blobs", force: :cascade do |t| - t.string "key", null: false - t.string "filename", null: false - t.string "content_type" - t.text "metadata" - t.string "service_name", null: false - t.bigint "byte_size", null: false - t.string "checksum" - t.datetime "created_at", null: false - t.index ["key"], name: "index_active_storage_blobs_on_key", unique: true - end - - create_table "active_storage_variant_records", force: :cascade do |t| - t.bigint "blob_id", null: false - t.string "variation_digest", null: false - t.index ["blob_id", "variation_digest"], name: "index_active_storage_variant_records_uniqueness", unique: true + + create_table 'address_kabupaten_lists', force: :cascade do |t| + t.string 'kabupaten' + t.datetime 'created_at', null: false + t.datetime 'updated_at', null: false + t.integer 'address_province_list_id', null: false + t.index ['address_province_list_id'], name: 'index_address_kabupaten_lists_on_address_province_list_id' end - create_table "address_kabupaten_lists", force: :cascade do |t| - t.string "kabupaten" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.integer "address_province_list_id", null: false - t.index ["address_province_list_id"], name: "index_address_kabupaten_lists_on_address_province_list_id" + create_table 'address_kecamatan_lists', force: :cascade do |t| + t.string 'kecamatan' + t.datetime 'created_at', null: false + t.datetime 'updated_at', null: false + t.integer 'address_kabupaten_list_id', null: false + t.index ['address_kabupaten_list_id'], name: 'index_address_kecamatan_lists_on_address_kabupaten_list_id' end - create_table "address_kecamatan_lists", force: :cascade do |t| - t.string "kecamatan" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.integer "address_kabupaten_list_id", null: false - t.index ["address_kabupaten_list_id"], name: "index_address_kecamatan_lists_on_address_kabupaten_list_id" + create_table 'address_province_lists', force: :cascade do |t| + t.string 'provinsi' + t.datetime 'created_at', null: false + t.datetime 'updated_at', null: false end - create_table "address_province_lists", force: :cascade do |t| - t.string "provinsi" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + create_table 'addresses', force: :cascade do |t| + t.string 'alamat' + t.string 'kelurahan' + t.string 'kecamatan' + t.integer 'kode_pos' + t.string 'provinsi' + t.integer 'no_telepon' + t.string 'kabupaten' + t.datetime 'created_at', null: false + t.datetime 'updated_at', null: false + t.integer 'user_id', null: false + t.index ['user_id'], name: 'index_addresses_on_user_id' end - create_table "addresses", force: :cascade do |t| - t.string "alamat" - t.string "kelurahan" - t.string "kecamatan" - t.integer "kode_pos" - t.string "provinsi" - t.integer "no_telepon" - t.string "kabupaten" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.integer "user_id", null: false - t.index ["user_id"], name: "index_addresses_on_user_id" - end - - create_table "all_school_lists", force: :cascade do |t| - t.string "sekolah" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + create_table 'all_school_lists', force: :cascade do |t| + t.string 'sekolah' + t.datetime 'created_at', null: false + t.datetime 'updated_at', null: false + end + + create_table 'batch_lists', force: :cascade do |t| + t.string 'gelombang' + t.boolean 'aktif' + t.datetime 'created_at', null: false + t.datetime 'updated_at', null: false end - create_table "batch_lists", force: :cascade do |t| - t.string "gelombang" - t.boolean "aktif" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - end - - create_table "cost_lists", force: :cascade do |t| - t.integer "biaya" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - end - - create_table "cost_vourcher_lists", force: :cascade do |t| - t.string "voucher" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - end - - create_table "costs", force: :cascade do |t| - t.integer "biaya" - t.integer "virtual_account" - t.string "voucher" - t.integer "total_bayar" - t.boolean "status_pembayaran" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.integer "user_id", null: false - t.index ["user_id"], name: "index_costs_on_user_id" + create_table 'cost_lists', force: :cascade do |t| + t.integer 'biaya' + t.datetime 'created_at', null: false + t.datetime 'updated_at', null: false + end + + create_table 'cost_vourcher_lists', force: :cascade do |t| + t.string 'voucher' + t.datetime 'created_at', null: false + t.datetime 'updated_at', null: false + end + + create_table 'costs', force: :cascade do |t| + t.integer 'biaya' + t.integer 'virtual_account' + t.string 'voucher' + t.integer 'total_bayar' + t.boolean 'status_pembayaran' + t.datetime 'created_at', null: false + t.datetime 'updated_at', null: false + t.integer 'user_id', null: false + t.index ['user_id'], name: 'index_costs_on_user_id' end - create_table "extra_lists", force: :cascade do |t| - t.string "predikat" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + create_table 'extra_lists', force: :cascade do |t| + t.string 'predikat' + t.datetime 'created_at', null: false + t.datetime 'updated_at', null: false end - create_table "extras", force: :cascade do |t| - t.string "nama_kegiatan" - t.date "mulai" - t.date "berakhir" - t.string "predikat" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.integer "user_id", null: false - t.index ["user_id"], name: "index_extras_on_user_id" + create_table 'extras', force: :cascade do |t| + t.string 'nama_kegiatan' + t.date 'mulai' + t.date 'berakhir' + t.string 'predikat' + t.datetime 'created_at', null: false + t.datetime 'updated_at', null: false + t.integer 'user_id', null: false + t.index ['user_id'], name: 'index_extras_on_user_id' end - create_table "high_school_majors", force: :cascade do |t| - t.string "jurusan" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + create_table 'high_school_majors', force: :cascade do |t| + t.string 'jurusan' + t.datetime 'created_at', null: false + t.datetime 'updated_at', null: false end - create_table "language_degree_lists", force: :cascade do |t| - t.string "tingkat" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + create_table 'language_degree_lists', force: :cascade do |t| + t.string 'tingkat' + t.datetime 'created_at', null: false + t.datetime 'updated_at', null: false end - create_table "language_name_lists", force: :cascade do |t| - t.string "bahasa" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + create_table 'language_name_lists', force: :cascade do |t| + t.string 'bahasa' + t.datetime 'created_at', null: false + t.datetime 'updated_at', null: false end - - create_table "languages", force: :cascade do |t| - t.string "nama_bahasa" - t.string "tingkat" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.integer "user_id", null: false - t.index ["user_id"], name: "index_languages_on_user_id" - end - - create_table "major_lists", force: :cascade do |t| - t.string "jurusan" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - end - - create_table "majors", force: :cascade do |t| - t.string "jurusan_1" - t.string "jurusan_2" - t.string "jurusan_3" - t.string "gelombang" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.integer "user_id", null: false - t.index ["user_id"], name: "index_majors_on_user_id" - end - - create_table "microposts", force: :cascade do |t| - t.text "content" - t.integer "user_id", null: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["user_id", "created_at"], name: "index_microposts_on_user_id_and_created_at" - t.index ["user_id"], name: "index_microposts_on_user_id" - end - - create_table "organization_degree_lists", force: :cascade do |t| - t.string "jabatan" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - end - - create_table "organizations", force: :cascade do |t| - t.string "nama_organisasi" - t.date "mulai" - t.date "berakhir" - t.string "jabatan" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.integer "user_id", null: false - t.index ["user_id"], name: "index_organizations_on_user_id" - end - - create_table "parent_education_lists", force: :cascade do |t| - t.string "pendidikan" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - end - - create_table "parent_job_lists", force: :cascade do |t| - t.string "pekerjaan" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - end - - create_table "parents", force: :cascade do |t| - t.string "nama_ayah" - t.string "nama_ibu" - t.integer "nik_ayah" - t.integer "nik_ibu" - t.string "pendidikan_ayah" - t.string "pendidikan_ibu" - t.date "tanggal_lahir_ayah" - t.date "tanggal_lahir_ibu" - t.string "pekerjaan_ayah" - t.string "pekerjaan_ibu" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.integer "user_id", null: false - t.index ["user_id"], name: "index_parents_on_user_id" - end - - create_table "personal_gender_lists", force: :cascade do |t| - t.string "jenis_kelamin" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - end - - create_table "personal_religion_lists", force: :cascade do |t| - t.string "agama" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - end - - create_table "personals", force: :cascade do |t| - t.string "nama_lengkap" - t.string "agama" - t.integer "nik" - t.integer "nisn" - t.integer "no_kps" - t.date "tanggal_lahir" - t.string "tempat_lahir" - t.string "jenis_kelamin" - t.string "domisili" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.integer "user_id", null: false - t.index ["user_id"], name: "index_personals_on_user_id" - end - - create_table "pmdk_each_score_informations", force: :cascade do |t| - t.decimal "matematika_semester_1" - t.decimal "matematika_semester_2" - t.decimal "matematika_semester_3" - t.decimal "matematika_semester_4" - t.decimal "matematika_semester_5" - t.decimal "fisika_semester_1" - t.decimal "fisika_semester_2" - t.decimal "fisika_semester_3" - t.decimal "fisika_semester_4" - t.decimal "fisika_semester_5" - t.decimal "kimia_semester_1" - t.decimal "kimia_semester_2" - t.decimal "kimia_semester_3" - t.decimal "kimia_semester_4" - t.decimal "kimia_semester_5" - t.decimal "bahasa_inggris_semester_1" - t.decimal "bahasa_inggris_semester_2" - t.decimal "bahasa_inggris_semester_3" - t.decimal "bahasa_inggris_semester_4" - t.decimal "bahasa_inggris_semester_5" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.integer "user_id", null: false - t.index ["user_id"], name: "index_pmdk_each_score_informations_on_user_id" - end - - create_table "pmdk_school_informations", force: :cascade do |t| - t.string "asal_sekolah" - t.string "akreditas" - t.integer "jumlah_pelajaran_un" - t.decimal "jumlah_nilai_un" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.integer "user_id", null: false - t.string "jurusan_sekolah" - t.index ["user_id"], name: "index_pmdk_school_informations_on_user_id" - end - - create_table "pmdk_school_lists", force: :cascade do |t| - t.string "sekolah" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - end - - create_table "pmdk_total_score_informations", force: :cascade do |t| - t.decimal "jumlah_nilai_semester_1" - t.decimal "jumlah_nilai_semester_2" - t.decimal "jumlah_nilai_semester_3" - t.decimal "jumlah_nilai_semester_4" - t.decimal "jumlah_nilai_semester_5" - t.integer "jumlah_pelajaran_semester_1" - t.integer "jumlah_pelajaran_semester_2" - t.integer "jumlah_pelajaran_semester_3" - t.integer "jumlah_pelajaran_semester_4" - t.integer "jumlah_pelajaran_semester_5" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.integer "user_id", null: false - t.index ["user_id"], name: "index_pmdk_total_score_informations_on_user_id" - end - - create_table "relationships", force: :cascade do |t| - t.integer "follower_id" - t.integer "followed_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["followed_id"], name: "index_relationships_on_followed_id" - t.index ["follower_id", "followed_id"], name: "index_relationships_on_follower_id_and_followed_id", unique: true - t.index ["follower_id"], name: "index_relationships_on_follower_id" - end - - create_table "source_information_lists", force: :cascade do |t| - t.string "informasi" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - end - - create_table "source_motivation_lists", force: :cascade do |t| - t.string "motivasi" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - end - - create_table "sources", force: :cascade do |t| - t.integer "jumlah_n" - t.string "sumber_informasi" - t.string "motivasi" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.integer "user_id", null: false - t.index ["user_id"], name: "index_sources_on_user_id" - end - - create_table "users", force: :cascade do |t| - t.string "name" - t.string "email" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.string "password_digest" - t.string "remember_digest" - t.boolean "admin", default: false - t.string "activation_digest" - t.boolean "activated", default: false - t.datetime "activated_at" - t.string "reset_digest" - t.datetime "reset_sent_at" - t.index ["email"], name: "index_users_on_email", unique: true - end - - create_table "usm_school_informations", force: :cascade do |t| - t.string "asal_sekolah" - t.string "akreditas" - t.integer "jumlah_pelajaran_un" - t.decimal "jumlah_nilai_un" - t.string "jurusan_sekolah" - t.integer "jumlah_pelajaran_semester_5" - t.decimal "jumlah_nilai_semester_5" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.integer "user_id", null: false - t.index ["user_id"], name: "index_usm_school_informations_on_user_id" - end - - create_table "utbk_school_informations", force: :cascade do |t| - t.string "asal_sekolah" - t.string "akreditas" - t.integer "jumlah_pelajaran_un" - t.decimal "jumlah_nilai_un" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.integer "user_id", null: false - t.string "jurusan_sekolah" - t.index ["user_id"], name: "index_utbk_school_informations_on_user_id" - end - - create_table "utbk_scores", force: :cascade do |t| - t.string "no_peserta" - t.date "tanggal_ujian" - t.decimal "nilai_penalaran_umum" - t.decimal "nilai_pengetahuan_kuantitatif" - t.decimal "nilai_pengetahuan_dan_pemahaman_umum" - t.decimal "nilai_kemampuan_memahami_bacaan_dan_menulis" - t.integer "jumlah_pelajaran_semester_6" - t.decimal "jumlah_nilai_semester_6" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.integer "user_id", null: false - t.index ["user_id"], name: "index_utbk_scores_on_user_id" - end - - add_foreign_key "achievements", "users" - add_foreign_key "active_storage_attachments", "active_storage_blobs", column: "blob_id" - add_foreign_key "active_storage_variant_records", "active_storage_blobs", column: "blob_id" - add_foreign_key "address_kabupaten_lists", "address_province_lists" - add_foreign_key "address_kecamatan_lists", "address_kabupaten_lists" - add_foreign_key "addresses", "users" - add_foreign_key "costs", "users" - add_foreign_key "extras", "users" - add_foreign_key "languages", "users" - add_foreign_key "majors", "users" - add_foreign_key "microposts", "users" - add_foreign_key "organizations", "users" - add_foreign_key "parents", "users" - add_foreign_key "personals", "users" - add_foreign_key "pmdk_each_score_informations", "users" - add_foreign_key "pmdk_school_informations", "users" - add_foreign_key "pmdk_total_score_informations", "users" - add_foreign_key "sources", "users" - add_foreign_key "usm_school_informations", "users" - add_foreign_key "utbk_school_informations", "users" - add_foreign_key "utbk_scores", "users" + + create_table 'languages', force: :cascade do |t| + t.string 'nama_bahasa' + t.string 'tingkat' + t.datetime 'created_at', null: false + t.datetime 'updated_at', null: false + t.integer 'user_id', null: false + t.index ['user_id'], name: 'index_languages_on_user_id' + end + + create_table 'major_lists', force: :cascade do |t| + t.string 'jurusan' + t.datetime 'created_at', null: false + t.datetime 'updated_at', null: false + end + + create_table 'majors', force: :cascade do |t| + t.string 'jurusan_1' + t.string 'jurusan_2' + t.string 'jurusan_3' + t.string 'gelombang' + t.datetime 'created_at', null: false + t.datetime 'updated_at', null: false + t.integer 'user_id', null: false + t.index ['user_id'], name: 'index_majors_on_user_id' + end + + create_table 'microposts', force: :cascade do |t| + t.text 'content' + t.integer 'user_id', null: false + t.datetime 'created_at', null: false + t.datetime 'updated_at', null: false + t.index %w[user_id created_at], name: 'index_microposts_on_user_id_and_created_at' + t.index ['user_id'], name: 'index_microposts_on_user_id' + end + + create_table 'organization_degree_lists', force: :cascade do |t| + t.string 'jabatan' + t.datetime 'created_at', null: false + t.datetime 'updated_at', null: false + end + + create_table 'organizations', force: :cascade do |t| + t.string 'nama_organisasi' + t.date 'mulai' + t.date 'berakhir' + t.string 'jabatan' + t.datetime 'created_at', null: false + t.datetime 'updated_at', null: false + t.integer 'user_id', null: false + t.index ['user_id'], name: 'index_organizations_on_user_id' + end + + create_table 'parent_education_lists', force: :cascade do |t| + t.string 'pendidikan' + t.datetime 'created_at', null: false + t.datetime 'updated_at', null: false + end + + create_table 'parent_job_lists', force: :cascade do |t| + t.string 'pekerjaan' + t.datetime 'created_at', null: false + t.datetime 'updated_at', null: false + end + + create_table 'parents', force: :cascade do |t| + t.string 'nama_ayah' + t.string 'nama_ibu' + t.integer 'nik_ayah' + t.integer 'nik_ibu' + t.string 'pendidikan_ayah' + t.string 'pendidikan_ibu' + t.date 'tanggal_lahir_ayah' + t.date 'tanggal_lahir_ibu' + t.string 'pekerjaan_ayah' + t.string 'pekerjaan_ibu' + t.datetime 'created_at', null: false + t.datetime 'updated_at', null: false + t.integer 'user_id', null: false + t.index ['user_id'], name: 'index_parents_on_user_id' + end + + create_table 'personal_gender_lists', force: :cascade do |t| + t.string 'jenis_kelamin' + t.datetime 'created_at', null: false + t.datetime 'updated_at', null: false + end + + create_table 'personal_religion_lists', force: :cascade do |t| + t.string 'agama' + t.datetime 'created_at', null: false + t.datetime 'updated_at', null: false + end + + create_table 'personals', force: :cascade do |t| + t.string 'nama_lengkap' + t.string 'agama' + t.integer 'nik' + t.integer 'nisn' + t.integer 'no_kps' + t.date 'tanggal_lahir' + t.string 'tempat_lahir' + t.string 'jenis_kelamin' + t.string 'domisili' + t.datetime 'created_at', null: false + t.datetime 'updated_at', null: false + t.integer 'user_id', null: false + t.index ['user_id'], name: 'index_personals_on_user_id' + end + + create_table 'pmdk_each_score_informations', force: :cascade do |t| + t.decimal 'matematika_semester_1' + t.decimal 'matematika_semester_2' + t.decimal 'matematika_semester_3' + t.decimal 'matematika_semester_4' + t.decimal 'matematika_semester_5' + t.decimal 'fisika_semester_1' + t.decimal 'fisika_semester_2' + t.decimal 'fisika_semester_3' + t.decimal 'fisika_semester_4' + t.decimal 'fisika_semester_5' + t.decimal 'kimia_semester_1' + t.decimal 'kimia_semester_2' + t.decimal 'kimia_semester_3' + t.decimal 'kimia_semester_4' + t.decimal 'kimia_semester_5' + t.decimal 'bahasa_inggris_semester_1' + t.decimal 'bahasa_inggris_semester_2' + t.decimal 'bahasa_inggris_semester_3' + t.decimal 'bahasa_inggris_semester_4' + t.decimal 'bahasa_inggris_semester_5' + t.datetime 'created_at', null: false + t.datetime 'updated_at', null: false + t.integer 'user_id', null: false + t.index ['user_id'], name: 'index_pmdk_each_score_informations_on_user_id' + end + + create_table 'pmdk_school_informations', force: :cascade do |t| + t.string 'asal_sekolah' + t.string 'akreditas' + t.integer 'jumlah_pelajaran_un' + t.decimal 'jumlah_nilai_un' + t.datetime 'created_at', null: false + t.datetime 'updated_at', null: false + t.integer 'user_id', null: false + t.string 'jurusan_sekolah' + t.index ['user_id'], name: 'index_pmdk_school_informations_on_user_id' + end + + create_table 'pmdk_school_lists', force: :cascade do |t| + t.string 'sekolah' + t.datetime 'created_at', null: false + t.datetime 'updated_at', null: false + end + + create_table 'pmdk_total_score_informations', force: :cascade do |t| + t.decimal 'jumlah_nilai_semester_1' + t.decimal 'jumlah_nilai_semester_2' + t.decimal 'jumlah_nilai_semester_3' + t.decimal 'jumlah_nilai_semester_4' + t.decimal 'jumlah_nilai_semester_5' + t.integer 'jumlah_pelajaran_semester_1' + t.integer 'jumlah_pelajaran_semester_2' + t.integer 'jumlah_pelajaran_semester_3' + t.integer 'jumlah_pelajaran_semester_4' + t.integer 'jumlah_pelajaran_semester_5' + t.datetime 'created_at', null: false + t.datetime 'updated_at', null: false + t.integer 'user_id', null: false + t.index ['user_id'], name: 'index_pmdk_total_score_informations_on_user_id' + end + + create_table 'relationships', force: :cascade do |t| + t.integer 'follower_id' + t.integer 'followed_id' + t.datetime 'created_at', null: false + t.datetime 'updated_at', null: false + t.index ['followed_id'], name: 'index_relationships_on_followed_id' + t.index %w[follower_id followed_id], name: 'index_relationships_on_follower_id_and_followed_id', unique: true + t.index ['follower_id'], name: 'index_relationships_on_follower_id' + end + + create_table 'source_information_lists', force: :cascade do |t| + t.string 'informasi' + t.datetime 'created_at', null: false + t.datetime 'updated_at', null: false + end + + create_table 'source_motivation_lists', force: :cascade do |t| + t.string 'motivasi' + t.datetime 'created_at', null: false + t.datetime 'updated_at', null: false + end + + create_table 'sources', force: :cascade do |t| + t.integer 'jumlah_n' + t.string 'sumber_informasi' + t.string 'motivasi' + t.datetime 'created_at', null: false + t.datetime 'updated_at', null: false + t.integer 'user_id', null: false + t.index ['user_id'], name: 'index_sources_on_user_id' + end + + create_table 'users', force: :cascade do |t| + t.string 'name' + t.string 'email' + t.datetime 'created_at', null: false + t.datetime 'updated_at', null: false + t.string 'password_digest' + t.string 'remember_digest' + t.boolean 'admin', default: false + t.string 'activation_digest' + t.boolean 'activated', default: false + t.datetime 'activated_at' + t.string 'reset_digest' + t.datetime 'reset_sent_at' + t.index ['email'], name: 'index_users_on_email', unique: true + end + + create_table 'usm_school_informations', force: :cascade do |t| + t.string 'asal_sekolah' + t.string 'akreditas' + t.integer 'jumlah_pelajaran_un' + t.decimal 'jumlah_nilai_un' + t.string 'jurusan_sekolah' + t.integer 'jumlah_pelajaran_semester_5' + t.decimal 'jumlah_nilai_semester_5' + t.datetime 'created_at', null: false + t.datetime 'updated_at', null: false + t.integer 'user_id', null: false + t.index ['user_id'], name: 'index_usm_school_informations_on_user_id' + end + + create_table 'utbk_school_informations', force: :cascade do |t| + t.string 'asal_sekolah' + t.string 'akreditas' + t.integer 'jumlah_pelajaran_un' + t.decimal 'jumlah_nilai_un' + t.datetime 'created_at', null: false + t.datetime 'updated_at', null: false + t.integer 'user_id', null: false + t.string 'jurusan_sekolah' + t.index ['user_id'], name: 'index_utbk_school_informations_on_user_id' + end + + create_table 'utbk_scores', force: :cascade do |t| + t.string 'no_peserta' + t.date 'tanggal_ujian' + t.decimal 'nilai_penalaran_umum' + t.decimal 'nilai_pengetahuan_kuantitatif' + t.decimal 'nilai_pengetahuan_dan_pemahaman_umum' + t.decimal 'nilai_kemampuan_memahami_bacaan_dan_menulis' + t.integer 'jumlah_pelajaran_semester_6' + t.decimal 'jumlah_nilai_semester_6' + t.datetime 'created_at', null: false + t.datetime 'updated_at', null: false + t.integer 'user_id', null: false + t.index ['user_id'], name: 'index_utbk_scores_on_user_id' + end + + add_foreign_key 'achievements', 'users' + add_foreign_key 'active_storage_attachments', 'active_storage_blobs', column: 'blob_id' + add_foreign_key 'active_storage_variant_records', 'active_storage_blobs', column: 'blob_id' + add_foreign_key 'address_kabupaten_lists', 'address_province_lists' + add_foreign_key 'address_kecamatan_lists', 'address_kabupaten_lists' + add_foreign_key 'addresses', 'users' + add_foreign_key 'costs', 'users' + add_foreign_key 'extras', 'users' + add_foreign_key 'languages', 'users' + add_foreign_key 'majors', 'users' + add_foreign_key 'microposts', 'users' + add_foreign_key 'organizations', 'users' + add_foreign_key 'parents', 'users' + add_foreign_key 'personals', 'users' + add_foreign_key 'pmdk_each_score_informations', 'users' + add_foreign_key 'pmdk_school_informations', 'users' + add_foreign_key 'pmdk_total_score_informations', 'users' + add_foreign_key 'sources', 'users' + add_foreign_key 'usm_school_informations', 'users' + add_foreign_key 'utbk_school_informations', 'users' + add_foreign_key 'utbk_scores', 'users' end diff --git a/db/seeds.rb b/db/seeds.rb index 88bb4e8..1b0f58e 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # This file should ensure the existence of records required to run the application in every environment (production, # development, test). The code here should be idempotent so that it can be executed at any point in every environment. # The data can then be loaded with the bin/rails db:seed command (or created alongside the database with db:setup). @@ -8,12 +10,12 @@ # MovieGenre.find_or_create_by!(name: genre_name) # end -#generate a bunch of additional users +# generate a bunch of additional users 99.times do |n| name = Faker::Name.name - email = "exampleother-#{n+1}@rails.org" - password = "password" - User.create!(name: name, email: email, password: password, + email = "exampleother-#{n + 1}@rails.org" + password = 'password' + User.create!(name:, email:, password:, password_confirmation: password, activated: true, activated_at: Time.zone.now) end User.create!(name: 'admin', @@ -23,17 +25,17 @@ admin: true, activated: true, activated_at: Time.zone.now) -#generate micropost for a subset of users -users = User.order(:created_at).take(6) #limit only for 6 users +# generate micropost for a subset of users +users = User.order(:created_at).take(6) # limit only for 6 users 50.times do - content = Faker::Lorem.sentence(word_count: 5) - #each user will contain 50 posts - users.each {|user| user.microposts.create!(content: content)} + content = Faker::Lorem.sentence(word_count: 5) + # each user will contain 50 posts + users.each { |user| user.microposts.create!(content:) } end -#generate following relationship -users = User.all +# generate following relationship +users = User.all user = users.first -following = users[2..50] #follow users 2 to 50 -followers = users[3..49] #followers users 3 to 49 -following.each { |followed| user.follow(followed)} #follow each user -followers.each {|follower| follower.follow(user)} #each user follow user +following = users[2..50] # follow users 2 to 50 +followers = users[3..49] # followers users 3 to 49 +following.each { |followed| user.follow(followed) } # follow each user +followers.each { |follower| follower.follow(user) } # each user follow user diff --git a/test/channels/application_cable/connection_test.rb b/test/channels/application_cable/connection_test.rb index 6340bf9..4aee9b3 100644 --- a/test/channels/application_cable/connection_test.rb +++ b/test/channels/application_cable/connection_test.rb @@ -1,4 +1,6 @@ -require "test_helper" +# frozen_string_literal: true + +require 'test_helper' module ApplicationCable class ConnectionTest < ActionCable::Connection::TestCase diff --git a/test/controllers/address_province_lists_controller_test.rb b/test/controllers/address_province_lists_controller_test.rb index 29c048a..1f27cca 100644 --- a/test/controllers/address_province_lists_controller_test.rb +++ b/test/controllers/address_province_lists_controller_test.rb @@ -1,10 +1,12 @@ -require "test_helper" +# frozen_string_literal: true + +require 'test_helper' class AddressProvinceListsControllerTest < ActionDispatch::IntegrationTest setup do get login_path post login_path, params: { - session: {email: users(:michael).email, password: 'password'} + session: { email: users(:michael).email, password: 'password' } } @address_province_list = address_province_lists(:aceh) end @@ -20,7 +22,7 @@ class AddressProvinceListsControllerTest < ActionDispatch::IntegrationTest end test 'should create address_province_list' do - assert_difference("AddressProvinceList.count") do + assert_difference('AddressProvinceList.count') do post address_province_lists_url, params: { address_province_list: { provinsi: 'jawa tengah' } } end @@ -45,7 +47,7 @@ class AddressProvinceListsControllerTest < ActionDispatch::IntegrationTest end test 'should destroy address_province_list' do - assert_difference("AddressProvinceList.count", -1) do + assert_difference('AddressProvinceList.count', -1) do delete address_province_list_url(@address_province_list) end diff --git a/test/helpers/sessions_helper_test.rb b/test/helpers/sessions_helper_test.rb index 6eaaf55..34cfaa9 100644 --- a/test/helpers/sessions_helper_test.rb +++ b/test/helpers/sessions_helper_test.rb @@ -1,15 +1,17 @@ +# frozen_string_literal: true + require 'test_helper' class SessionsHelperTest < ActionView::TestCase def setup - @user = users(:michael) + @user = users(:michael) remember @user end - test "current user return right user when session is nil" do + test 'current user return right user when session is nil' do assert_equal @user, current_user assert is_logged_in? end - test "current user return nil when remember digest is wrong" do - @user.update_attribute(:remember_digest,User.digest(User.new_token)) + test 'current user return nil when remember digest is wrong' do + @user.update_attribute(:remember_digest, User.digest(User.new_token)) assert_nil current_user end end diff --git a/test/mailers/previews/user_mailer_preview.rb b/test/mailers/previews/user_mailer_preview.rb index 9f23aca..41c1dd7 100644 --- a/test/mailers/previews/user_mailer_preview.rb +++ b/test/mailers/previews/user_mailer_preview.rb @@ -1,10 +1,11 @@ +# frozen_string_literal: true + # Preview all emails at http://localhost:3000/rails/mailers/user_mailer class UserMailerPreview < ActionMailer::Preview - # Preview this email at http://localhost:3000/rails/mailers/user_mailer/account_activation def account_activation - #UserMailer.account_activation - user = User.first + # UserMailer.account_activation + user = User.first user.activation_token = User.new_token UserMailer.account_activation(user) end @@ -15,5 +16,4 @@ def password_reset user.reset_token = User.new_token UserMailer.password_reset(user) end - end diff --git a/test/mailers/user_mailer_test.rb b/test/mailers/user_mailer_test.rb index 7de0d86..881225b 100644 --- a/test/mailers/user_mailer_test.rb +++ b/test/mailers/user_mailer_test.rb @@ -1,26 +1,28 @@ -require "test_helper" +# frozen_string_literal: true + +require 'test_helper' class UserMailerTest < ActionMailer::TestCase - test "account_activation" do - user = users(:michael) + test 'account_activation' do + user = users(:michael) user.activation_token = User.new_token mail = UserMailer.account_activation(user) - assert_equal "Account activation", mail.subject + assert_equal 'Account activation', mail.subject assert_equal [user.email], mail.to - assert_equal ["from@example.com"], mail.from - assert_match "Hi", mail.body.encoded - assert_match user.name, mail.body.encoded + assert_equal ['from@example.com'], mail.from + assert_match 'Hi', mail.body.encoded + assert_match user.name, mail.body.encoded assert_match user.activation_token, mail.body.encoded assert_match CGI.escape(user.email), mail.body.encoded end - test "password_reset" do - user = users(:michael) + test 'password_reset' do + user = users(:michael) user.reset_token = User.new_token mail = UserMailer.password_reset(user) - assert_equal "Password reset", mail.subject + assert_equal 'Password reset', mail.subject assert_equal [user.email], mail.to - assert_equal ["from@example.com"], mail.from + assert_equal ['from@example.com'], mail.from assert_match user.reset_token, mail.body.encoded assert_match CGI.escape(user.email), mail.body.encoded end diff --git a/test/system/accreditation_school_lists_test.rb b/test/system/accreditation_school_lists_test.rb index 6727554..87d021c 100644 --- a/test/system/accreditation_school_lists_test.rb +++ b/test/system/accreditation_school_lists_test.rb @@ -1,41 +1,43 @@ -require "application_system_test_case" +# frozen_string_literal: true + +require 'application_system_test_case' class AccreditationSchoolListsTest < ApplicationSystemTestCase setup do @accreditation_school_list = accreditation_school_lists(:one) end - test "visiting the index" do + test 'visiting the index' do visit accreditation_school_lists_url - assert_selector "h1", text: "Accreditation school lists" + assert_selector 'h1', text: 'Accreditation school lists' end - test "should create accreditation school list" do + test 'should create accreditation school list' do visit accreditation_school_lists_url - click_on "New accreditation school list" + click_on 'New accreditation school list' - fill_in "Akreditasi", with: @accreditation_school_list.akreditasi - click_on "Create Accreditation school list" + fill_in 'Akreditasi', with: @accreditation_school_list.akreditasi + click_on 'Create Accreditation school list' - assert_text "Accreditation school list was successfully created" - click_on "Back" + assert_text 'Accreditation school list was successfully created' + click_on 'Back' end - test "should update Accreditation school list" do + test 'should update Accreditation school list' do visit accreditation_school_list_url(@accreditation_school_list) - click_on "Edit this accreditation school list", match: :first + click_on 'Edit this accreditation school list', match: :first - fill_in "Akreditasi", with: @accreditation_school_list.akreditasi - click_on "Update Accreditation school list" + fill_in 'Akreditasi', with: @accreditation_school_list.akreditasi + click_on 'Update Accreditation school list' - assert_text "Accreditation school list was successfully updated" - click_on "Back" + assert_text 'Accreditation school list was successfully updated' + click_on 'Back' end - test "should destroy Accreditation school list" do + test 'should destroy Accreditation school list' do visit accreditation_school_list_url(@accreditation_school_list) - click_on "Destroy this accreditation school list", match: :first + click_on 'Destroy this accreditation school list', match: :first - assert_text "Accreditation school list was successfully destroyed" + assert_text 'Accreditation school list was successfully destroyed' end end diff --git a/test/system/achievement_kategori_lists_test.rb b/test/system/achievement_kategori_lists_test.rb index da1aeda..eb05cd5 100644 --- a/test/system/achievement_kategori_lists_test.rb +++ b/test/system/achievement_kategori_lists_test.rb @@ -1,41 +1,43 @@ -require "application_system_test_case" +# frozen_string_literal: true + +require 'application_system_test_case' class AchievementKategoriListsTest < ApplicationSystemTestCase setup do @achievement_kategori_list = achievement_kategori_lists(:one) end - test "visiting the index" do + test 'visiting the index' do visit achievement_kategori_lists_url - assert_selector "h1", text: "Achievement kategori lists" + assert_selector 'h1', text: 'Achievement kategori lists' end - test "should create achievement kategori list" do + test 'should create achievement kategori list' do visit achievement_kategori_lists_url - click_on "New achievement kategori list" + click_on 'New achievement kategori list' - fill_in "Kategori", with: @achievement_kategori_list.kategori - click_on "Create Achievement kategori list" + fill_in 'Kategori', with: @achievement_kategori_list.kategori + click_on 'Create Achievement kategori list' - assert_text "Achievement kategori list was successfully created" - click_on "Back" + assert_text 'Achievement kategori list was successfully created' + click_on 'Back' end - test "should update Achievement kategori list" do + test 'should update Achievement kategori list' do visit achievement_kategori_list_url(@achievement_kategori_list) - click_on "Edit this achievement kategori list", match: :first + click_on 'Edit this achievement kategori list', match: :first - fill_in "Kategori", with: @achievement_kategori_list.kategori - click_on "Update Achievement kategori list" + fill_in 'Kategori', with: @achievement_kategori_list.kategori + click_on 'Update Achievement kategori list' - assert_text "Achievement kategori list was successfully updated" - click_on "Back" + assert_text 'Achievement kategori list was successfully updated' + click_on 'Back' end - test "should destroy Achievement kategori list" do + test 'should destroy Achievement kategori list' do visit achievement_kategori_list_url(@achievement_kategori_list) - click_on "Destroy this achievement kategori list", match: :first + click_on 'Destroy this achievement kategori list', match: :first - assert_text "Achievement kategori list was successfully destroyed" + assert_text 'Achievement kategori list was successfully destroyed' end end diff --git a/test/system/achievement_tingkat_lists_test.rb b/test/system/achievement_tingkat_lists_test.rb index 530439e..6f82291 100644 --- a/test/system/achievement_tingkat_lists_test.rb +++ b/test/system/achievement_tingkat_lists_test.rb @@ -1,41 +1,43 @@ -require "application_system_test_case" +# frozen_string_literal: true + +require 'application_system_test_case' class AchievementTingkatListsTest < ApplicationSystemTestCase setup do @achievement_tingkat_list = achievement_tingkat_lists(:one) end - test "visiting the index" do + test 'visiting the index' do visit achievement_tingkat_lists_url - assert_selector "h1", text: "Achievement tingkat lists" + assert_selector 'h1', text: 'Achievement tingkat lists' end - test "should create achievement tingkat list" do + test 'should create achievement tingkat list' do visit achievement_tingkat_lists_url - click_on "New achievement tingkat list" + click_on 'New achievement tingkat list' - fill_in "Tingkat", with: @achievement_tingkat_list.tingkat - click_on "Create Achievement tingkat list" + fill_in 'Tingkat', with: @achievement_tingkat_list.tingkat + click_on 'Create Achievement tingkat list' - assert_text "Achievement tingkat list was successfully created" - click_on "Back" + assert_text 'Achievement tingkat list was successfully created' + click_on 'Back' end - test "should update Achievement tingkat list" do + test 'should update Achievement tingkat list' do visit achievement_tingkat_list_url(@achievement_tingkat_list) - click_on "Edit this achievement tingkat list", match: :first + click_on 'Edit this achievement tingkat list', match: :first - fill_in "Tingkat", with: @achievement_tingkat_list.tingkat - click_on "Update Achievement tingkat list" + fill_in 'Tingkat', with: @achievement_tingkat_list.tingkat + click_on 'Update Achievement tingkat list' - assert_text "Achievement tingkat list was successfully updated" - click_on "Back" + assert_text 'Achievement tingkat list was successfully updated' + click_on 'Back' end - test "should destroy Achievement tingkat list" do + test 'should destroy Achievement tingkat list' do visit achievement_tingkat_list_url(@achievement_tingkat_list) - click_on "Destroy this achievement tingkat list", match: :first + click_on 'Destroy this achievement tingkat list', match: :first - assert_text "Achievement tingkat list was successfully destroyed" + assert_text 'Achievement tingkat list was successfully destroyed' end end diff --git a/test/system/address_kabupaten_lists_test.rb b/test/system/address_kabupaten_lists_test.rb index 0d7d6b5..6f062b6 100644 --- a/test/system/address_kabupaten_lists_test.rb +++ b/test/system/address_kabupaten_lists_test.rb @@ -1,41 +1,43 @@ -require "application_system_test_case" +# frozen_string_literal: true + +require 'application_system_test_case' class AddressKabupatenListsTest < ApplicationSystemTestCase setup do @address_kabupaten_list = address_kabupaten_lists(:one) end - test "visiting the index" do + test 'visiting the index' do visit address_kabupaten_lists_url - assert_selector "h1", text: "Address kabupaten lists" + assert_selector 'h1', text: 'Address kabupaten lists' end - test "should create address kabupaten list" do + test 'should create address kabupaten list' do visit address_kabupaten_lists_url - click_on "New address kabupaten list" + click_on 'New address kabupaten list' - fill_in "Kabupaten", with: @address_kabupaten_list.kabupaten - click_on "Create Address kabupaten list" + fill_in 'Kabupaten', with: @address_kabupaten_list.kabupaten + click_on 'Create Address kabupaten list' - assert_text "Address kabupaten list was successfully created" - click_on "Back" + assert_text 'Address kabupaten list was successfully created' + click_on 'Back' end - test "should update Address kabupaten list" do + test 'should update Address kabupaten list' do visit address_kabupaten_list_url(@address_kabupaten_list) - click_on "Edit this address kabupaten list", match: :first + click_on 'Edit this address kabupaten list', match: :first - fill_in "Kabupaten", with: @address_kabupaten_list.kabupaten - click_on "Update Address kabupaten list" + fill_in 'Kabupaten', with: @address_kabupaten_list.kabupaten + click_on 'Update Address kabupaten list' - assert_text "Address kabupaten list was successfully updated" - click_on "Back" + assert_text 'Address kabupaten list was successfully updated' + click_on 'Back' end - test "should destroy Address kabupaten list" do + test 'should destroy Address kabupaten list' do visit address_kabupaten_list_url(@address_kabupaten_list) - click_on "Destroy this address kabupaten list", match: :first + click_on 'Destroy this address kabupaten list', match: :first - assert_text "Address kabupaten list was successfully destroyed" + assert_text 'Address kabupaten list was successfully destroyed' end end diff --git a/test/system/address_kecamatan_lists_test.rb b/test/system/address_kecamatan_lists_test.rb index 1f16ff3..2043a82 100644 --- a/test/system/address_kecamatan_lists_test.rb +++ b/test/system/address_kecamatan_lists_test.rb @@ -1,41 +1,43 @@ -require "application_system_test_case" +# frozen_string_literal: true + +require 'application_system_test_case' class AddressKecamatanListsTest < ApplicationSystemTestCase setup do @address_kecamatan_list = address_kecamatan_lists(:one) end - test "visiting the index" do + test 'visiting the index' do visit address_kecamatan_lists_url - assert_selector "h1", text: "Address kecamatan lists" + assert_selector 'h1', text: 'Address kecamatan lists' end - test "should create address kecamatan list" do + test 'should create address kecamatan list' do visit address_kecamatan_lists_url - click_on "New address kecamatan list" + click_on 'New address kecamatan list' - fill_in "Kecamatan", with: @address_kecamatan_list.kecamatan - click_on "Create Address kecamatan list" + fill_in 'Kecamatan', with: @address_kecamatan_list.kecamatan + click_on 'Create Address kecamatan list' - assert_text "Address kecamatan list was successfully created" - click_on "Back" + assert_text 'Address kecamatan list was successfully created' + click_on 'Back' end - test "should update Address kecamatan list" do + test 'should update Address kecamatan list' do visit address_kecamatan_list_url(@address_kecamatan_list) - click_on "Edit this address kecamatan list", match: :first + click_on 'Edit this address kecamatan list', match: :first - fill_in "Kecamatan", with: @address_kecamatan_list.kecamatan - click_on "Update Address kecamatan list" + fill_in 'Kecamatan', with: @address_kecamatan_list.kecamatan + click_on 'Update Address kecamatan list' - assert_text "Address kecamatan list was successfully updated" - click_on "Back" + assert_text 'Address kecamatan list was successfully updated' + click_on 'Back' end - test "should destroy Address kecamatan list" do + test 'should destroy Address kecamatan list' do visit address_kecamatan_list_url(@address_kecamatan_list) - click_on "Destroy this address kecamatan list", match: :first + click_on 'Destroy this address kecamatan list', match: :first - assert_text "Address kecamatan list was successfully destroyed" + assert_text 'Address kecamatan list was successfully destroyed' end end diff --git a/test/system/address_province_lists_test.rb b/test/system/address_province_lists_test.rb index fdf8a0c..bd868c4 100644 --- a/test/system/address_province_lists_test.rb +++ b/test/system/address_province_lists_test.rb @@ -1,41 +1,43 @@ -require "application_system_test_case" +# frozen_string_literal: true + +require 'application_system_test_case' class AddressProvinceListsTest < ApplicationSystemTestCase setup do @address_province_list = address_province_lists(:one) end - test "visiting the index" do + test 'visiting the index' do visit address_province_lists_url - assert_selector "h1", text: "Address province lists" + assert_selector 'h1', text: 'Address province lists' end - test "should create address province list" do + test 'should create address province list' do visit address_province_lists_url - click_on "New address province list" + click_on 'New address province list' - fill_in "Provinsi", with: @address_province_list.provinsi - click_on "Create Address province list" + fill_in 'Provinsi', with: @address_province_list.provinsi + click_on 'Create Address province list' - assert_text "Address province list was successfully created" - click_on "Back" + assert_text 'Address province list was successfully created' + click_on 'Back' end - test "should update Address province list" do + test 'should update Address province list' do visit address_province_list_url(@address_province_list) - click_on "Edit this address province list", match: :first + click_on 'Edit this address province list', match: :first - fill_in "Provinsi", with: @address_province_list.provinsi - click_on "Update Address province list" + fill_in 'Provinsi', with: @address_province_list.provinsi + click_on 'Update Address province list' - assert_text "Address province list was successfully updated" - click_on "Back" + assert_text 'Address province list was successfully updated' + click_on 'Back' end - test "should destroy Address province list" do + test 'should destroy Address province list' do visit address_province_list_url(@address_province_list) - click_on "Destroy this address province list", match: :first + click_on 'Destroy this address province list', match: :first - assert_text "Address province list was successfully destroyed" + assert_text 'Address province list was successfully destroyed' end end diff --git a/test/system/all_school_lists_test.rb b/test/system/all_school_lists_test.rb index 3420233..19037a6 100644 --- a/test/system/all_school_lists_test.rb +++ b/test/system/all_school_lists_test.rb @@ -1,41 +1,43 @@ -require "application_system_test_case" +# frozen_string_literal: true + +require 'application_system_test_case' class AllSchoolListsTest < ApplicationSystemTestCase setup do @all_school_list = all_school_lists(:one) end - test "visiting the index" do + test 'visiting the index' do visit all_school_lists_url - assert_selector "h1", text: "All school lists" + assert_selector 'h1', text: 'All school lists' end - test "should create all school list" do + test 'should create all school list' do visit all_school_lists_url - click_on "New all school list" + click_on 'New all school list' - fill_in "Sekolah", with: @all_school_list.sekolah - click_on "Create All school list" + fill_in 'Sekolah', with: @all_school_list.sekolah + click_on 'Create All school list' - assert_text "All school list was successfully created" - click_on "Back" + assert_text 'All school list was successfully created' + click_on 'Back' end - test "should update All school list" do + test 'should update All school list' do visit all_school_list_url(@all_school_list) - click_on "Edit this all school list", match: :first + click_on 'Edit this all school list', match: :first - fill_in "Sekolah", with: @all_school_list.sekolah - click_on "Update All school list" + fill_in 'Sekolah', with: @all_school_list.sekolah + click_on 'Update All school list' - assert_text "All school list was successfully updated" - click_on "Back" + assert_text 'All school list was successfully updated' + click_on 'Back' end - test "should destroy All school list" do + test 'should destroy All school list' do visit all_school_list_url(@all_school_list) - click_on "Destroy this all school list", match: :first + click_on 'Destroy this all school list', match: :first - assert_text "All school list was successfully destroyed" + assert_text 'All school list was successfully destroyed' end end diff --git a/test/system/batch_lists_test.rb b/test/system/batch_lists_test.rb index f9fbea5..fd71b34 100644 --- a/test/system/batch_lists_test.rb +++ b/test/system/batch_lists_test.rb @@ -1,43 +1,45 @@ -require "application_system_test_case" +# frozen_string_literal: true + +require 'application_system_test_case' class BatchListsTest < ApplicationSystemTestCase setup do @batch_list = batch_lists(:one) end - test "visiting the index" do + test 'visiting the index' do visit batch_lists_url - assert_selector "h1", text: "Batch lists" + assert_selector 'h1', text: 'Batch lists' end - test "should create batch list" do + test 'should create batch list' do visit batch_lists_url - click_on "New batch list" + click_on 'New batch list' - check "Aktif" if @batch_list.aktif - fill_in "Gelombang", with: @batch_list.gelombang - click_on "Create Batch list" + check 'Aktif' if @batch_list.aktif + fill_in 'Gelombang', with: @batch_list.gelombang + click_on 'Create Batch list' - assert_text "Batch list was successfully created" - click_on "Back" + assert_text 'Batch list was successfully created' + click_on 'Back' end - test "should update Batch list" do + test 'should update Batch list' do visit batch_list_url(@batch_list) - click_on "Edit this batch list", match: :first + click_on 'Edit this batch list', match: :first - check "Aktif" if @batch_list.aktif - fill_in "Gelombang", with: @batch_list.gelombang - click_on "Update Batch list" + check 'Aktif' if @batch_list.aktif + fill_in 'Gelombang', with: @batch_list.gelombang + click_on 'Update Batch list' - assert_text "Batch list was successfully updated" - click_on "Back" + assert_text 'Batch list was successfully updated' + click_on 'Back' end - test "should destroy Batch list" do + test 'should destroy Batch list' do visit batch_list_url(@batch_list) - click_on "Destroy this batch list", match: :first + click_on 'Destroy this batch list', match: :first - assert_text "Batch list was successfully destroyed" + assert_text 'Batch list was successfully destroyed' end end diff --git a/test/system/extra_lists_test.rb b/test/system/extra_lists_test.rb index 6892b8a..c763085 100644 --- a/test/system/extra_lists_test.rb +++ b/test/system/extra_lists_test.rb @@ -1,41 +1,43 @@ -require "application_system_test_case" +# frozen_string_literal: true + +require 'application_system_test_case' class ExtraListsTest < ApplicationSystemTestCase setup do @extra_list = extra_lists(:one) end - test "visiting the index" do + test 'visiting the index' do visit extra_lists_url - assert_selector "h1", text: "Extra lists" + assert_selector 'h1', text: 'Extra lists' end - test "should create extra list" do + test 'should create extra list' do visit extra_lists_url - click_on "New extra list" + click_on 'New extra list' - fill_in "Predikat", with: @extra_list.predikat - click_on "Create Extra list" + fill_in 'Predikat', with: @extra_list.predikat + click_on 'Create Extra list' - assert_text "Extra list was successfully created" - click_on "Back" + assert_text 'Extra list was successfully created' + click_on 'Back' end - test "should update Extra list" do + test 'should update Extra list' do visit extra_list_url(@extra_list) - click_on "Edit this extra list", match: :first + click_on 'Edit this extra list', match: :first - fill_in "Predikat", with: @extra_list.predikat - click_on "Update Extra list" + fill_in 'Predikat', with: @extra_list.predikat + click_on 'Update Extra list' - assert_text "Extra list was successfully updated" - click_on "Back" + assert_text 'Extra list was successfully updated' + click_on 'Back' end - test "should destroy Extra list" do + test 'should destroy Extra list' do visit extra_list_url(@extra_list) - click_on "Destroy this extra list", match: :first + click_on 'Destroy this extra list', match: :first - assert_text "Extra list was successfully destroyed" + assert_text 'Extra list was successfully destroyed' end end diff --git a/test/system/high_school_majors_test.rb b/test/system/high_school_majors_test.rb index 0c9607d..aa1c047 100644 --- a/test/system/high_school_majors_test.rb +++ b/test/system/high_school_majors_test.rb @@ -1,41 +1,43 @@ -require "application_system_test_case" +# frozen_string_literal: true + +require 'application_system_test_case' class HighSchoolMajorsTest < ApplicationSystemTestCase setup do @high_school_major = high_school_majors(:one) end - test "visiting the index" do + test 'visiting the index' do visit high_school_majors_url - assert_selector "h1", text: "High school majors" + assert_selector 'h1', text: 'High school majors' end - test "should create high school major" do + test 'should create high school major' do visit high_school_majors_url - click_on "New high school major" + click_on 'New high school major' - fill_in "Jurusan", with: @high_school_major.jurusan - click_on "Create High school major" + fill_in 'Jurusan', with: @high_school_major.jurusan + click_on 'Create High school major' - assert_text "High school major was successfully created" - click_on "Back" + assert_text 'High school major was successfully created' + click_on 'Back' end - test "should update High school major" do + test 'should update High school major' do visit high_school_major_url(@high_school_major) - click_on "Edit this high school major", match: :first + click_on 'Edit this high school major', match: :first - fill_in "Jurusan", with: @high_school_major.jurusan - click_on "Update High school major" + fill_in 'Jurusan', with: @high_school_major.jurusan + click_on 'Update High school major' - assert_text "High school major was successfully updated" - click_on "Back" + assert_text 'High school major was successfully updated' + click_on 'Back' end - test "should destroy High school major" do + test 'should destroy High school major' do visit high_school_major_url(@high_school_major) - click_on "Destroy this high school major", match: :first + click_on 'Destroy this high school major', match: :first - assert_text "High school major was successfully destroyed" + assert_text 'High school major was successfully destroyed' end end diff --git a/test/system/language_degree_lists_test.rb b/test/system/language_degree_lists_test.rb index 061febd..79438b1 100644 --- a/test/system/language_degree_lists_test.rb +++ b/test/system/language_degree_lists_test.rb @@ -1,41 +1,43 @@ -require "application_system_test_case" +# frozen_string_literal: true + +require 'application_system_test_case' class LanguageDegreeListsTest < ApplicationSystemTestCase setup do @language_degree_list = language_degree_lists(:one) end - test "visiting the index" do + test 'visiting the index' do visit language_degree_lists_url - assert_selector "h1", text: "Language degree lists" + assert_selector 'h1', text: 'Language degree lists' end - test "should create language degree list" do + test 'should create language degree list' do visit language_degree_lists_url - click_on "New language degree list" + click_on 'New language degree list' - fill_in "Tingkat", with: @language_degree_list.tingkat - click_on "Create Language degree list" + fill_in 'Tingkat', with: @language_degree_list.tingkat + click_on 'Create Language degree list' - assert_text "Language degree list was successfully created" - click_on "Back" + assert_text 'Language degree list was successfully created' + click_on 'Back' end - test "should update Language degree list" do + test 'should update Language degree list' do visit language_degree_list_url(@language_degree_list) - click_on "Edit this language degree list", match: :first + click_on 'Edit this language degree list', match: :first - fill_in "Tingkat", with: @language_degree_list.tingkat - click_on "Update Language degree list" + fill_in 'Tingkat', with: @language_degree_list.tingkat + click_on 'Update Language degree list' - assert_text "Language degree list was successfully updated" - click_on "Back" + assert_text 'Language degree list was successfully updated' + click_on 'Back' end - test "should destroy Language degree list" do + test 'should destroy Language degree list' do visit language_degree_list_url(@language_degree_list) - click_on "Destroy this language degree list", match: :first + click_on 'Destroy this language degree list', match: :first - assert_text "Language degree list was successfully destroyed" + assert_text 'Language degree list was successfully destroyed' end end diff --git a/test/system/language_name_lists_test.rb b/test/system/language_name_lists_test.rb index 5502223..7f2b98e 100644 --- a/test/system/language_name_lists_test.rb +++ b/test/system/language_name_lists_test.rb @@ -1,41 +1,43 @@ -require "application_system_test_case" +# frozen_string_literal: true + +require 'application_system_test_case' class LanguageNameListsTest < ApplicationSystemTestCase setup do @language_name_list = language_name_lists(:one) end - test "visiting the index" do + test 'visiting the index' do visit language_name_lists_url - assert_selector "h1", text: "Language name lists" + assert_selector 'h1', text: 'Language name lists' end - test "should create language name list" do + test 'should create language name list' do visit language_name_lists_url - click_on "New language name list" + click_on 'New language name list' - fill_in "Bahasa", with: @language_name_list.bahasa - click_on "Create Language name list" + fill_in 'Bahasa', with: @language_name_list.bahasa + click_on 'Create Language name list' - assert_text "Language name list was successfully created" - click_on "Back" + assert_text 'Language name list was successfully created' + click_on 'Back' end - test "should update Language name list" do + test 'should update Language name list' do visit language_name_list_url(@language_name_list) - click_on "Edit this language name list", match: :first + click_on 'Edit this language name list', match: :first - fill_in "Bahasa", with: @language_name_list.bahasa - click_on "Update Language name list" + fill_in 'Bahasa', with: @language_name_list.bahasa + click_on 'Update Language name list' - assert_text "Language name list was successfully updated" - click_on "Back" + assert_text 'Language name list was successfully updated' + click_on 'Back' end - test "should destroy Language name list" do + test 'should destroy Language name list' do visit language_name_list_url(@language_name_list) - click_on "Destroy this language name list", match: :first + click_on 'Destroy this language name list', match: :first - assert_text "Language name list was successfully destroyed" + assert_text 'Language name list was successfully destroyed' end end diff --git a/test/system/major_lists_test.rb b/test/system/major_lists_test.rb index 62ae16e..9f8437d 100644 --- a/test/system/major_lists_test.rb +++ b/test/system/major_lists_test.rb @@ -1,41 +1,43 @@ -require "application_system_test_case" +# frozen_string_literal: true + +require 'application_system_test_case' class MajorListsTest < ApplicationSystemTestCase setup do @major_list = major_lists(:one) end - test "visiting the index" do + test 'visiting the index' do visit major_lists_url - assert_selector "h1", text: "Major lists" + assert_selector 'h1', text: 'Major lists' end - test "should create major list" do + test 'should create major list' do visit major_lists_url - click_on "New major list" + click_on 'New major list' - fill_in "Jurusan", with: @major_list.jurusan - click_on "Create Major list" + fill_in 'Jurusan', with: @major_list.jurusan + click_on 'Create Major list' - assert_text "Major list was successfully created" - click_on "Back" + assert_text 'Major list was successfully created' + click_on 'Back' end - test "should update Major list" do + test 'should update Major list' do visit major_list_url(@major_list) - click_on "Edit this major list", match: :first + click_on 'Edit this major list', match: :first - fill_in "Jurusan", with: @major_list.jurusan - click_on "Update Major list" + fill_in 'Jurusan', with: @major_list.jurusan + click_on 'Update Major list' - assert_text "Major list was successfully updated" - click_on "Back" + assert_text 'Major list was successfully updated' + click_on 'Back' end - test "should destroy Major list" do + test 'should destroy Major list' do visit major_list_url(@major_list) - click_on "Destroy this major list", match: :first + click_on 'Destroy this major list', match: :first - assert_text "Major list was successfully destroyed" + assert_text 'Major list was successfully destroyed' end end diff --git a/test/system/organization_degree_lists_test.rb b/test/system/organization_degree_lists_test.rb index d3c4696..4e9c579 100644 --- a/test/system/organization_degree_lists_test.rb +++ b/test/system/organization_degree_lists_test.rb @@ -1,41 +1,43 @@ -require "application_system_test_case" +# frozen_string_literal: true + +require 'application_system_test_case' class OrganizationDegreeListsTest < ApplicationSystemTestCase setup do @organization_degree_list = organization_degree_lists(:one) end - test "visiting the index" do + test 'visiting the index' do visit organization_degree_lists_url - assert_selector "h1", text: "Organization degree lists" + assert_selector 'h1', text: 'Organization degree lists' end - test "should create organization degree list" do + test 'should create organization degree list' do visit organization_degree_lists_url - click_on "New organization degree list" + click_on 'New organization degree list' - fill_in "Jabatan", with: @organization_degree_list.jabatan - click_on "Create Organization degree list" + fill_in 'Jabatan', with: @organization_degree_list.jabatan + click_on 'Create Organization degree list' - assert_text "Organization degree list was successfully created" - click_on "Back" + assert_text 'Organization degree list was successfully created' + click_on 'Back' end - test "should update Organization degree list" do + test 'should update Organization degree list' do visit organization_degree_list_url(@organization_degree_list) - click_on "Edit this organization degree list", match: :first + click_on 'Edit this organization degree list', match: :first - fill_in "Jabatan", with: @organization_degree_list.jabatan - click_on "Update Organization degree list" + fill_in 'Jabatan', with: @organization_degree_list.jabatan + click_on 'Update Organization degree list' - assert_text "Organization degree list was successfully updated" - click_on "Back" + assert_text 'Organization degree list was successfully updated' + click_on 'Back' end - test "should destroy Organization degree list" do + test 'should destroy Organization degree list' do visit organization_degree_list_url(@organization_degree_list) - click_on "Destroy this organization degree list", match: :first + click_on 'Destroy this organization degree list', match: :first - assert_text "Organization degree list was successfully destroyed" + assert_text 'Organization degree list was successfully destroyed' end end diff --git a/test/system/parent_education_lists_test.rb b/test/system/parent_education_lists_test.rb index 96667a7..5c58dcb 100644 --- a/test/system/parent_education_lists_test.rb +++ b/test/system/parent_education_lists_test.rb @@ -1,41 +1,43 @@ -require "application_system_test_case" +# frozen_string_literal: true + +require 'application_system_test_case' class ParentEducationListsTest < ApplicationSystemTestCase setup do @parent_education_list = parent_education_lists(:one) end - test "visiting the index" do + test 'visiting the index' do visit parent_education_lists_url - assert_selector "h1", text: "Parent education lists" + assert_selector 'h1', text: 'Parent education lists' end - test "should create parent education list" do + test 'should create parent education list' do visit parent_education_lists_url - click_on "New parent education list" + click_on 'New parent education list' - fill_in "Pendidikan", with: @parent_education_list.pendidikan - click_on "Create Parent education list" + fill_in 'Pendidikan', with: @parent_education_list.pendidikan + click_on 'Create Parent education list' - assert_text "Parent education list was successfully created" - click_on "Back" + assert_text 'Parent education list was successfully created' + click_on 'Back' end - test "should update Parent education list" do + test 'should update Parent education list' do visit parent_education_list_url(@parent_education_list) - click_on "Edit this parent education list", match: :first + click_on 'Edit this parent education list', match: :first - fill_in "Pendidikan", with: @parent_education_list.pendidikan - click_on "Update Parent education list" + fill_in 'Pendidikan', with: @parent_education_list.pendidikan + click_on 'Update Parent education list' - assert_text "Parent education list was successfully updated" - click_on "Back" + assert_text 'Parent education list was successfully updated' + click_on 'Back' end - test "should destroy Parent education list" do + test 'should destroy Parent education list' do visit parent_education_list_url(@parent_education_list) - click_on "Destroy this parent education list", match: :first + click_on 'Destroy this parent education list', match: :first - assert_text "Parent education list was successfully destroyed" + assert_text 'Parent education list was successfully destroyed' end end diff --git a/test/system/parent_job_lists_test.rb b/test/system/parent_job_lists_test.rb index 2479dbf..b2ac1e1 100644 --- a/test/system/parent_job_lists_test.rb +++ b/test/system/parent_job_lists_test.rb @@ -1,41 +1,43 @@ -require "application_system_test_case" +# frozen_string_literal: true + +require 'application_system_test_case' class ParentJobListsTest < ApplicationSystemTestCase setup do @parent_job_list = parent_job_lists(:one) end - test "visiting the index" do + test 'visiting the index' do visit parent_job_lists_url - assert_selector "h1", text: "Parent job lists" + assert_selector 'h1', text: 'Parent job lists' end - test "should create parent job list" do + test 'should create parent job list' do visit parent_job_lists_url - click_on "New parent job list" + click_on 'New parent job list' - fill_in "Pekerjaan", with: @parent_job_list.pekerjaan - click_on "Create Parent job list" + fill_in 'Pekerjaan', with: @parent_job_list.pekerjaan + click_on 'Create Parent job list' - assert_text "Parent job list was successfully created" - click_on "Back" + assert_text 'Parent job list was successfully created' + click_on 'Back' end - test "should update Parent job list" do + test 'should update Parent job list' do visit parent_job_list_url(@parent_job_list) - click_on "Edit this parent job list", match: :first + click_on 'Edit this parent job list', match: :first - fill_in "Pekerjaan", with: @parent_job_list.pekerjaan - click_on "Update Parent job list" + fill_in 'Pekerjaan', with: @parent_job_list.pekerjaan + click_on 'Update Parent job list' - assert_text "Parent job list was successfully updated" - click_on "Back" + assert_text 'Parent job list was successfully updated' + click_on 'Back' end - test "should destroy Parent job list" do + test 'should destroy Parent job list' do visit parent_job_list_url(@parent_job_list) - click_on "Destroy this parent job list", match: :first + click_on 'Destroy this parent job list', match: :first - assert_text "Parent job list was successfully destroyed" + assert_text 'Parent job list was successfully destroyed' end end diff --git a/test/system/personal_gender_lists_test.rb b/test/system/personal_gender_lists_test.rb index 5d9abd9..84b0f3a 100644 --- a/test/system/personal_gender_lists_test.rb +++ b/test/system/personal_gender_lists_test.rb @@ -1,41 +1,43 @@ -require "application_system_test_case" +# frozen_string_literal: true + +require 'application_system_test_case' class PersonalGenderListsTest < ApplicationSystemTestCase setup do @personal_gender_list = personal_gender_lists(:one) end - test "visiting the index" do + test 'visiting the index' do visit personal_gender_lists_url - assert_selector "h1", text: "Personal gender lists" + assert_selector 'h1', text: 'Personal gender lists' end - test "should create personal gender list" do + test 'should create personal gender list' do visit personal_gender_lists_url - click_on "New personal gender list" + click_on 'New personal gender list' - fill_in "Jenis kelamin", with: @personal_gender_list.jenis_kelamin - click_on "Create Personal gender list" + fill_in 'Jenis kelamin', with: @personal_gender_list.jenis_kelamin + click_on 'Create Personal gender list' - assert_text "Personal gender list was successfully created" - click_on "Back" + assert_text 'Personal gender list was successfully created' + click_on 'Back' end - test "should update Personal gender list" do + test 'should update Personal gender list' do visit personal_gender_list_url(@personal_gender_list) - click_on "Edit this personal gender list", match: :first + click_on 'Edit this personal gender list', match: :first - fill_in "Jenis kelamin", with: @personal_gender_list.jenis_kelamin - click_on "Update Personal gender list" + fill_in 'Jenis kelamin', with: @personal_gender_list.jenis_kelamin + click_on 'Update Personal gender list' - assert_text "Personal gender list was successfully updated" - click_on "Back" + assert_text 'Personal gender list was successfully updated' + click_on 'Back' end - test "should destroy Personal gender list" do + test 'should destroy Personal gender list' do visit personal_gender_list_url(@personal_gender_list) - click_on "Destroy this personal gender list", match: :first + click_on 'Destroy this personal gender list', match: :first - assert_text "Personal gender list was successfully destroyed" + assert_text 'Personal gender list was successfully destroyed' end end diff --git a/test/system/personal_religion_lists_test.rb b/test/system/personal_religion_lists_test.rb index 9434e0f..52d7d97 100644 --- a/test/system/personal_religion_lists_test.rb +++ b/test/system/personal_religion_lists_test.rb @@ -1,41 +1,43 @@ -require "application_system_test_case" +# frozen_string_literal: true + +require 'application_system_test_case' class PersonalReligionListsTest < ApplicationSystemTestCase setup do @personal_religion_list = personal_religion_lists(:one) end - test "visiting the index" do + test 'visiting the index' do visit personal_religion_lists_url - assert_selector "h1", text: "Personal religion lists" + assert_selector 'h1', text: 'Personal religion lists' end - test "should create personal religion list" do + test 'should create personal religion list' do visit personal_religion_lists_url - click_on "New personal religion list" + click_on 'New personal religion list' - fill_in "Agama", with: @personal_religion_list.agama - click_on "Create Personal religion list" + fill_in 'Agama', with: @personal_religion_list.agama + click_on 'Create Personal religion list' - assert_text "Personal religion list was successfully created" - click_on "Back" + assert_text 'Personal religion list was successfully created' + click_on 'Back' end - test "should update Personal religion list" do + test 'should update Personal religion list' do visit personal_religion_list_url(@personal_religion_list) - click_on "Edit this personal religion list", match: :first + click_on 'Edit this personal religion list', match: :first - fill_in "Agama", with: @personal_religion_list.agama - click_on "Update Personal religion list" + fill_in 'Agama', with: @personal_religion_list.agama + click_on 'Update Personal religion list' - assert_text "Personal religion list was successfully updated" - click_on "Back" + assert_text 'Personal religion list was successfully updated' + click_on 'Back' end - test "should destroy Personal religion list" do + test 'should destroy Personal religion list' do visit personal_religion_list_url(@personal_religion_list) - click_on "Destroy this personal religion list", match: :first + click_on 'Destroy this personal religion list', match: :first - assert_text "Personal religion list was successfully destroyed" + assert_text 'Personal religion list was successfully destroyed' end end diff --git a/test/system/pmdk_school_lists_test.rb b/test/system/pmdk_school_lists_test.rb index 963c31a..6b24181 100644 --- a/test/system/pmdk_school_lists_test.rb +++ b/test/system/pmdk_school_lists_test.rb @@ -1,41 +1,43 @@ -require "application_system_test_case" +# frozen_string_literal: true + +require 'application_system_test_case' class PmdkSchoolListsTest < ApplicationSystemTestCase setup do @pmdk_school_list = pmdk_school_lists(:one) end - test "visiting the index" do + test 'visiting the index' do visit pmdk_school_lists_url - assert_selector "h1", text: "Pmdk school lists" + assert_selector 'h1', text: 'Pmdk school lists' end - test "should create pmdk school list" do + test 'should create pmdk school list' do visit pmdk_school_lists_url - click_on "New pmdk school list" + click_on 'New pmdk school list' - fill_in "Sekolah", with: @pmdk_school_list.sekolah - click_on "Create Pmdk school list" + fill_in 'Sekolah', with: @pmdk_school_list.sekolah + click_on 'Create Pmdk school list' - assert_text "Pmdk school list was successfully created" - click_on "Back" + assert_text 'Pmdk school list was successfully created' + click_on 'Back' end - test "should update Pmdk school list" do + test 'should update Pmdk school list' do visit pmdk_school_list_url(@pmdk_school_list) - click_on "Edit this pmdk school list", match: :first + click_on 'Edit this pmdk school list', match: :first - fill_in "Sekolah", with: @pmdk_school_list.sekolah - click_on "Update Pmdk school list" + fill_in 'Sekolah', with: @pmdk_school_list.sekolah + click_on 'Update Pmdk school list' - assert_text "Pmdk school list was successfully updated" - click_on "Back" + assert_text 'Pmdk school list was successfully updated' + click_on 'Back' end - test "should destroy Pmdk school list" do + test 'should destroy Pmdk school list' do visit pmdk_school_list_url(@pmdk_school_list) - click_on "Destroy this pmdk school list", match: :first + click_on 'Destroy this pmdk school list', match: :first - assert_text "Pmdk school list was successfully destroyed" + assert_text 'Pmdk school list was successfully destroyed' end end diff --git a/test/system/source_information_lists_test.rb b/test/system/source_information_lists_test.rb index 216e28d..00d80da 100644 --- a/test/system/source_information_lists_test.rb +++ b/test/system/source_information_lists_test.rb @@ -1,41 +1,43 @@ -require "application_system_test_case" +# frozen_string_literal: true + +require 'application_system_test_case' class SourceInformationListsTest < ApplicationSystemTestCase setup do @source_information_list = source_information_lists(:one) end - test "visiting the index" do + test 'visiting the index' do visit source_information_lists_url - assert_selector "h1", text: "Source information lists" + assert_selector 'h1', text: 'Source information lists' end - test "should create source information list" do + test 'should create source information list' do visit source_information_lists_url - click_on "New source information list" + click_on 'New source information list' - fill_in "Informasi", with: @source_information_list.informasi - click_on "Create Source information list" + fill_in 'Informasi', with: @source_information_list.informasi + click_on 'Create Source information list' - assert_text "Source information list was successfully created" - click_on "Back" + assert_text 'Source information list was successfully created' + click_on 'Back' end - test "should update Source information list" do + test 'should update Source information list' do visit source_information_list_url(@source_information_list) - click_on "Edit this source information list", match: :first + click_on 'Edit this source information list', match: :first - fill_in "Informasi", with: @source_information_list.informasi - click_on "Update Source information list" + fill_in 'Informasi', with: @source_information_list.informasi + click_on 'Update Source information list' - assert_text "Source information list was successfully updated" - click_on "Back" + assert_text 'Source information list was successfully updated' + click_on 'Back' end - test "should destroy Source information list" do + test 'should destroy Source information list' do visit source_information_list_url(@source_information_list) - click_on "Destroy this source information list", match: :first + click_on 'Destroy this source information list', match: :first - assert_text "Source information list was successfully destroyed" + assert_text 'Source information list was successfully destroyed' end end diff --git a/test/system/source_motivation_lists_test.rb b/test/system/source_motivation_lists_test.rb index 2c47c84..96e69da 100644 --- a/test/system/source_motivation_lists_test.rb +++ b/test/system/source_motivation_lists_test.rb @@ -1,41 +1,43 @@ -require "application_system_test_case" +# frozen_string_literal: true + +require 'application_system_test_case' class SourceMotivationListsTest < ApplicationSystemTestCase setup do @source_motivation_list = source_motivation_lists(:one) end - test "visiting the index" do + test 'visiting the index' do visit source_motivation_lists_url - assert_selector "h1", text: "Source motivation lists" + assert_selector 'h1', text: 'Source motivation lists' end - test "should create source motivation list" do + test 'should create source motivation list' do visit source_motivation_lists_url - click_on "New source motivation list" + click_on 'New source motivation list' - fill_in "Motivasi", with: @source_motivation_list.motivasi - click_on "Create Source motivation list" + fill_in 'Motivasi', with: @source_motivation_list.motivasi + click_on 'Create Source motivation list' - assert_text "Source motivation list was successfully created" - click_on "Back" + assert_text 'Source motivation list was successfully created' + click_on 'Back' end - test "should update Source motivation list" do + test 'should update Source motivation list' do visit source_motivation_list_url(@source_motivation_list) - click_on "Edit this source motivation list", match: :first + click_on 'Edit this source motivation list', match: :first - fill_in "Motivasi", with: @source_motivation_list.motivasi - click_on "Update Source motivation list" + fill_in 'Motivasi', with: @source_motivation_list.motivasi + click_on 'Update Source motivation list' - assert_text "Source motivation list was successfully updated" - click_on "Back" + assert_text 'Source motivation list was successfully updated' + click_on 'Back' end - test "should destroy Source motivation list" do + test 'should destroy Source motivation list' do visit source_motivation_list_url(@source_motivation_list) - click_on "Destroy this source motivation list", match: :first + click_on 'Destroy this source motivation list', match: :first - assert_text "Source motivation list was successfully destroyed" + assert_text 'Source motivation list was successfully destroyed' end end