<%= form_with(model: @major, local: true, data: {turbo: false}) do |f| %>
<%= render "shared/error_messages", object: f.object %>
- <%= f.select :jurusan_1, options_from_collection_for_select(@major_list, 'jurusan', 'jurusan'),
+ <%= f.select :jurusan1, options_from_collection_for_select(@major_list, 'jurusan', 'jurusan'),
+ {}, {class: 'form-select', required: true}%>
+ <%= f.select :jurusan2, options_from_collection_for_select(@major_list, 'jurusan', 'jurusan'),
+ {}, {class: 'form-select', required: true}%>
+ <%= f.select :jurusan3, options_from_collection_for_select(@major_list, 'jurusan', 'jurusan'),
{}, {class: 'form-select', required: true}%>
- <%= f.select :jurusan_2, options_from_collection_for_select(@major_list, 'jurusan', 'jurusan'),
- {}, {class: 'form-select', required: true}%>
- <%= f.select :jurusan_3, options_from_collection_for_select(@major_list, 'jurusan', 'jurusan'),
- {}, {class: 'form-select', required: true}%>
<%= f.select :gelombang, options_from_collection_for_select(@batch_list, 'gelombang', 'gelombang'),
{}, {class: 'form-select', required: true}%>
<%= f.submit "Simpan", class: 'btn btn-primary' %>
diff --git a/app/views/shared/_pmdk_each_score_form.html.erb b/app/views/shared/_pmdk_each_score_form.html.erb
index 020cec8..27c97e3 100644
--- a/app/views/shared/_pmdk_each_score_form.html.erb
+++ b/app/views/shared/_pmdk_each_score_form.html.erb
@@ -4,48 +4,48 @@
<%= form_with(model: @pmdk_each_score, local: true, data: {turbo: false}) do |f| %>
<%= render "shared/error_messages", object: f.object %>
- <%= f.text_field :matematika_semester_1, class: 'form-control',
+ <%= f.text_field :matematika_semester1, class: 'form-control',
placeholder: 'Nilai Matematika Semester 1' %>
- <%= f.text_field :matematika_semester_2, class: 'form-control',
- placeholder: 'Nilai Matematika Semester 2' %>
- <%= f.text_field :matematika_semester_3, class: 'form-control',
+ <%= f.text_field :matematika_semester2, class: 'form-control',
+ placeholder: 'Nilai Matematika Semester 2' %>
+ <%= f.text_field :matematika_semester3, class: 'form-control',
placeholder: 'Nilai Matematika Semester 3' %>
- <%= f.text_field :matematika_semester_4, class: 'form-control',
+ <%= f.text_field :matematika_semester4, class: 'form-control',
placeholder: 'Nilai Matematika Semester 4' %>
- <%= f.text_field :matematika_semester_5, class: 'form-control',
+ <%= f.text_field :matematika5, class: 'form-control',
placeholder: 'Nilai Matematika Semester 5' %>
- <%= f.text_field :kimia_semester_1, class: 'form-control',
+ <%= f.text_field :kimia1, class: 'form-control',
placeholder: 'Nilai Kimia Semester 1' %>
- <%= f.text_field :kimia_semester_2, class: 'form-control',
+ <%= f.text_field :kimia2, class: 'form-control',
placeholder: 'Nilai Kimia Semester 2' %>
- <%= f.text_field :kimia_semester_3, class: 'form-control',
+ <%= f.text_field :kimia3, class: 'form-control',
placeholder: 'Nilai Kimia Semester 3' %>
- <%= f.text_field :kimia_semester_4, class: 'form-control',
+ <%= f.text_field :kimia4, class: 'form-control',
placeholder: 'Nilai Kimia Semester 4' %>
- <%= f.text_field :kimia_semester_5, class: 'form-control',
+ <%= f.text_field :kimia5, class: 'form-control',
placeholder: 'Nilai Kimia Semester 5' %>
- <%= f.text_field :fisika_semester_1, class: 'form-control',
+ <%= f.text_field :fisika1, class: 'form-control',
placeholder: 'Nilai Fisika Semester 1' %>
- <%= f.text_field :fisika_semester_2, class: 'form-control',
+ <%= f.text_field :fisika2, class: 'form-control',
placeholder: 'Nilai Fisika Semester 2' %>
- <%= f.text_field :fisika_semester_3, class: 'form-control',
+ <%= f.text_field :fisika3, class: 'form-control',
placeholder: 'Nilai Fisika Semester 3' %>
- <%= f.text_field :fisika_semester_4, class: 'form-control',
+ <%= f.text_field :fisika4, class: 'form-control',
placeholder: 'Nilai Fisika Semester 4' %>
- <%= f.text_field :fisika_semester_5, class: 'form-control',
+ <%= f.text_field :fisika5, class: 'form-control',
placeholder: 'Nilai Fisika Semester 5' %>
- <%= f.text_field :bahasa_inggris_semester_1, class: 'form-control',
+ <%= f.text_field :inggris1, class: 'form-control',
placeholder: 'Nilai Bahasa Inggris Semester 1' %>
- <%= f.text_field :bahasa_inggris_semester_2, class: 'form-control',
+ <%= f.text_field :inggris2, class: 'form-control',
placeholder: 'Nilai Bahasa Inggris Semester 2' %>
- <%= f.text_field :bahasa_inggris_semester_3, class: 'form-control',
+ <%= f.text_field :inggris3, class: 'form-control',
placeholder: 'Nilai Bahasa Inggris Semester 3' %>
- <%= f.text_field :bahasa_inggris_semester_4, class: 'form-control',
+ <%= f.text_field :inggris4, class: 'form-control',
placeholder: 'Nilai Bahasa Inggris Semester 4' %>
- <%= f.text_field :bahasa_inggris_semester_5, class: 'form-control',
+ <%= f.text_field :inggris5, class: 'form-control',
placeholder: 'Nilai Bahasa Inggris Semester 5' %>
<%= f.file_field :sertifikat, accept: 'application/pdf' %>
<% if @pmdk_each_score.persisted? && @pmdk_each_score.sertifikat.attached? %>
diff --git a/app/views/shared/_pmdk_total_form.html.erb b/app/views/shared/_pmdk_total_form.html.erb
index 7eadfdb..685fdb8 100644
--- a/app/views/shared/_pmdk_total_form.html.erb
+++ b/app/views/shared/_pmdk_total_form.html.erb
@@ -4,25 +4,25 @@
<%= form_with(model: @pmdk_total_score, local: true, data: {turbo: false}) do |f| %>
<%= render "shared/error_messages", object: f.object %>
- <%= f.text_field :jumlah_nilai_semester_1, class: 'form-control',
+ <%= f.text_field :jumlah_nilai_semester1, class: 'form-control',
placeholder: 'Jumlah Nilai Semester 1' %>
- <%= f.text_field :jumlah_pelajaran_semester_1, class: 'form-control',
- placeholder: 'Jumlah Pelajaran Semester 1' %>
- <%= f.text_field :jumlah_nilai_semester_2, class: 'form-control',
+ <%= f.text_field :jumlah_pelajaran_semester1, class: 'form-control',
+ placeholder: 'Jumlah Pelajaran Semester 1' %>
+ <%= f.text_field :jumlah_nilai_semester2, class: 'form-control',
placeholder: 'Jumlah Nilai Semester 2' %>
- <%= f.text_field :jumlah_pelajaran_semester_2, class: 'form-control',
+ <%= f.text_field :jumlah_pelajaran_semester2, class: 'form-control',
placeholder: 'Jumlah Pelajaran Semester 2' %>
- <%= f.text_field :jumlah_nilai_semester_3, class: 'form-control',
+ <%= f.text_field :jumlah_nilai_semester3, class: 'form-control',
placeholder: 'Jumlah Nilai Semester 3' %>
- <%= f.text_field :jumlah_pelajaran_semester_3, class: 'form-control',
+ <%= f.text_field :jumlah_pelajaran_semester3, class: 'form-control',
placeholder: 'Jumlah Pelajaran Semester 3' %>
- <%= f.text_field :jumlah_nilai_semester_4, class: 'form-control',
+ <%= f.text_field :jumlah_nilai_semester4, class: 'form-control',
placeholder: 'Jumlah Nilai Semester 4' %>
- <%= f.text_field :jumlah_pelajaran_semester_4, class: 'form-control',
+ <%= f.text_field :jumlah_pelajaran_semester4, class: 'form-control',
placeholder: 'Jumlah Pelajaran Semester 4' %>
- <%= f.text_field :jumlah_nilai_semester_5, class: 'form-control',
+ <%= f.text_field :jumlah_nilai_semester5, class: 'form-control',
placeholder: 'Jumlah Nilai Semester 5' %>
- <%= f.text_field :jumlah_pelajaran_semester_5, class: 'form-control',
+ <%= f.text_field :jumlah_pelajaran_semester5, class: 'form-control',
placeholder: 'Jumlah Pelajaran Semester 5' %>
<%= f.file_field :surat_rekomendasi, accept: 'application/pdf' %>
<%if @pmdk_total_score.persisted? &&
diff --git a/app/views/shared/_usm_school_form.html.erb b/app/views/shared/_usm_school_form.html.erb
index 6a0c750..9c48be2 100644
--- a/app/views/shared/_usm_school_form.html.erb
+++ b/app/views/shared/_usm_school_form.html.erb
@@ -11,10 +11,10 @@
@accreditation, 'akreditasi','akreditasi'), {} , {class: 'form-select', required: true} %>
<%= f.number_field :jumlah_pelajaran_un, class: 'form-control', placeholder: 'Jumlah Pelajaran UN' %>
<%= f.text_field :jumlah_nilai_un, class: 'form-control', placeholder: 'Jumlah Nilai UN' %>
- <%= f.text_field :jumlah_nilai_semester_5, class: 'form-control',
- placeholder: 'Jumlah Nilai Semester 5' %>
- <%= f.number_field :jumlah_pelajaran_semester_5, class: 'form-control',
- placeholder: 'Jumlah Pelajaran Semester 5' %>
+ <%= f.text_field :jumlah_nilai_semester5, class: 'form-control',
+ placeholder: 'Jumlah Nilai Semester 5' %>
+ <%= f.number_field :jumlah_pelajaran_semester5, class: 'form-control',
+ placeholder: 'Jumlah Pelajaran Semester 5' %>
<%= f.submit "Simpan", class: 'btn btn-primary' %>
<% end %>
diff --git a/app/views/shared/_utbk_score_form.html.erb b/app/views/shared/_utbk_score_form.html.erb
index 80ae365..2acccd3 100644
--- a/app/views/shared/_utbk_score_form.html.erb
+++ b/app/views/shared/_utbk_score_form.html.erb
@@ -14,10 +14,10 @@
placeholder: 'Nilai Pengetahuan Kuantitatif' %>
<%= f.text_field :nilai_kemampuan_memahami_bacaan_dan_menulis, class: 'form-control',
placeholder: 'Nilai Kemampuan Memahami Bacaan & Menulis' %>
- <%= f.text_field :jumlah_nilai_semester_6, class: 'form-control',
- placeholder: 'Jumlah Nilai Semester 6' %>
- <%= f.number_field :jumlah_pelajaran_semester_6, class: 'form-control',
- placeholder: 'Jumlah Pelajaran Semester 6' %>
+ <%= f.text_field :jumlah_nilai_semester6, class: 'form-control',
+ placeholder: 'Jumlah Nilai Semester 6' %>
+ <%= f.number_field :jumlah_pelajaran_semester6, class: 'form-control',
+ placeholder: 'Jumlah Pelajaran Semester 6' %>
<%= f.file_field :sertifikat_utbk, accept: "application/pdf" %>
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..b9f3eaf 100644
--- a/db/migrate/20240117033057_create_majors.rb
+++ b/db/migrate/20240117033057_create_majors.rb
@@ -1,9 +1,11 @@
+# frozen_string_literal: true
+
class CreateMajors < ActiveRecord::Migration[7.1]
def change
create_table :majors do |t|
- t.string :jurusan_1
- t.string :jurusan_2
- t.string :jurusan_3
+ t.string :jurusan1
+ t.string :jurusan2
+ t.string :jurusan3
t.string :gelombang
t.timestamps
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..7286925 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|
@@ -19,7 +21,7 @@ def change
t.numeric :kimia_semester_4
t.numeric :kimia_semester_5
- t.numeric :bahasa_inggris_semester_1
+ t.numeric :inggris1
t.numeric :bahasa_inggris_semester_2
t.numeric :bahasa_inggris_semester_3
t.numeric :bahasa_inggris_semester_4
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/migrate/20240131140455_change_column_major_to_normal_case.rb b/db/migrate/20240131140455_change_column_major_to_normal_case.rb
new file mode 100644
index 0000000..47311a9
--- /dev/null
+++ b/db/migrate/20240131140455_change_column_major_to_normal_case.rb
@@ -0,0 +1,9 @@
+# frozen_string_literal: true
+
+class ChangeColumnMajorToNormalCase < ActiveRecord::Migration[7.1]
+ def change
+ rename_column :majors, :jurusan_1, :jurusan1
+ rename_column :majors, :jurusan_2, :jurusan2
+ rename_column :majors, :jurusan_3, :jurusan3
+ end
+end
diff --git a/db/migrate/20240131143459_change_column_pmdk_each_to_normal_case.rb b/db/migrate/20240131143459_change_column_pmdk_each_to_normal_case.rb
new file mode 100644
index 0000000..c144e70
--- /dev/null
+++ b/db/migrate/20240131143459_change_column_pmdk_each_to_normal_case.rb
@@ -0,0 +1,14 @@
+# frozen_string_literal: true
+
+class ChangeColumnPmdkEachToNormalCase < ActiveRecord::Migration[7.1]
+ def change
+ rename_column :pmdk_each_score_informations, :matematika_semester_1,
+ :matematika_semester1
+ rename_column :pmdk_each_score_informations, :matematika_semester_2,
+ :matematika_semester2
+ rename_column :pmdk_each_score_informations, :matematika_semester_3,
+ :matematika_semester3
+ rename_column :pmdk_each_score_informations, :matematika_semester_4,
+ :matematika_semester4
+ end
+end
diff --git a/db/migrate/20240131145828_rename_column_pmdk_each_to_normal_case.rb b/db/migrate/20240131145828_rename_column_pmdk_each_to_normal_case.rb
new file mode 100644
index 0000000..5865f42
--- /dev/null
+++ b/db/migrate/20240131145828_rename_column_pmdk_each_to_normal_case.rb
@@ -0,0 +1,38 @@
+# frozen_string_literal: true
+
+class RenameColumnPmdkEachToNormalCase < ActiveRecord::Migration[7.1]
+ def change
+ rename_column :pmdk_each_score_informations, :matematika_semester_5,
+ :matematika5
+ rename_column :pmdk_each_score_informations, :fisika_semester_1,
+ :fisika1
+ rename_column :pmdk_each_score_informations, :fisika_semester_2,
+ :fisika2
+ rename_column :pmdk_each_score_informations, :fisika_semester_3,
+ :fisika3
+ rename_column :pmdk_each_score_informations, :fisika_semester_4,
+ :fisika4
+ rename_column :pmdk_each_score_informations, :fisika_semester_5,
+ :fisika5
+ rename_column :pmdk_each_score_informations, :kimia_semester_1,
+ :kimia1
+ rename_column :pmdk_each_score_informations, :kimia_semester_2,
+ :kimia2
+ rename_column :pmdk_each_score_informations, :kimia_semester_3,
+ :kimia3
+ rename_column :pmdk_each_score_informations, :kimia_semester_4,
+ :kimia4
+ rename_column :pmdk_each_score_informations, :kimia_semester_5,
+ :kimia5
+ rename_column :pmdk_each_score_informations, :inggris1,
+ :inggris1
+ rename_column :pmdk_each_score_informations, :bahasa_inggris_semester_2,
+ :inggri2
+ rename_column :pmdk_each_score_informations, :bahasa_inggris_semester_3,
+ :inggris3
+ rename_column :pmdk_each_score_informations, :bahasa_inggris_semester_4,
+ :inggris4
+ rename_column :pmdk_each_score_informations, :bahasa_inggris_semester_5,
+ :inggris5
+ end
+end
diff --git a/db/migrate/20240131233338_rename_column_in_pmdk.rb b/db/migrate/20240131233338_rename_column_in_pmdk.rb
new file mode 100644
index 0000000..760eb97
--- /dev/null
+++ b/db/migrate/20240131233338_rename_column_in_pmdk.rb
@@ -0,0 +1,7 @@
+# frozen_string_literal: true
+
+class RenameColumnInPmdk < ActiveRecord::Migration[7.1]
+ def change
+ rename_column :pmdk_each_score_informations, :inggri2, :inggris2
+ end
+end
diff --git a/db/migrate/20240201000155_rename_column_total_score.rb b/db/migrate/20240201000155_rename_column_total_score.rb
new file mode 100644
index 0000000..00cc785
--- /dev/null
+++ b/db/migrate/20240201000155_rename_column_total_score.rb
@@ -0,0 +1,26 @@
+# frozen_string_literal: true
+
+class RenameColumnTotalScore < ActiveRecord::Migration[7.1]
+ def change
+ rename_column :pmdk_total_score_informations, :jumlah_nilai_semester_1,
+ :jumlah_nilai_semester1
+ rename_column :pmdk_total_score_informations, :jumlah_nilai_semester_2,
+ :jumlah_nilai_semester2
+ rename_column :pmdk_total_score_informations, :jumlah_nilai_semester_3,
+ :jumlah_nilai_semester3
+ rename_column :pmdk_total_score_informations, :jumlah_nilai_semester_4,
+ :jumlah_nilai_semester4
+ rename_column :pmdk_total_score_informations, :jumlah_nilai_semester_5,
+ :jumlah_nilai_semester5
+ rename_column :pmdk_total_score_informations, :jumlah_pelajaran_semester_1,
+ :jumlah_pelajaran_semester1
+ rename_column :pmdk_total_score_informations, :jumlah_pelajaran_semester_2,
+ :jumlah_pelajaran_semester2
+ rename_column :pmdk_total_score_informations, :jumlah_pelajaran_semester_3,
+ :jumlah_pelajaran_semester3
+ rename_column :pmdk_total_score_informations, :jumlah_pelajaran_semester_4,
+ :jumlah_pelajaran_semester4
+ rename_column :pmdk_total_score_informations, :jumlah_pelajaran_semester_5,
+ :jumlah_pelajaran_semester5
+ end
+end
diff --git a/db/migrate/20240201001601_rename_column_usm.rb b/db/migrate/20240201001601_rename_column_usm.rb
new file mode 100644
index 0000000..e49ff13
--- /dev/null
+++ b/db/migrate/20240201001601_rename_column_usm.rb
@@ -0,0 +1,10 @@
+# frozen_string_literal: true
+
+class RenameColumnUsm < ActiveRecord::Migration[7.1]
+ def change
+ rename_column :usm_school_informations, :jumlah_nilai_semester_5,
+ :jumlah_nilai_semester5
+ rename_column :usm_school_informations, :jumlah_pelajaran_semester_5,
+ :jumlah_pelajaran_semester5
+ end
+end
diff --git a/db/migrate/20240201014932_rename_column_utbk.rb b/db/migrate/20240201014932_rename_column_utbk.rb
new file mode 100644
index 0000000..671a37d
--- /dev/null
+++ b/db/migrate/20240201014932_rename_column_utbk.rb
@@ -0,0 +1,10 @@
+# frozen_string_literal: true
+
+class RenameColumnUtbk < ActiveRecord::Migration[7.1]
+ def change
+ rename_column :utbk_scores, :jumlah_pelajaran_semester_6,
+ :jumlah_pelajaran_semester6
+ rename_column :utbk_scores, :jumlah_nilai_semester_6,
+ :jumlah_nilai_semester6
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index fe8f0b1..5685ae0 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_201_014_932) 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 'jurusan1'
+ t.string 'jurusan2'
+ t.string 'jurusan3'
+ 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_semester1'
+ t.decimal 'matematika_semester2'
+ t.decimal 'matematika_semester3'
+ t.decimal 'matematika_semester4'
+ t.decimal 'matematika5'
+ t.decimal 'fisika1'
+ t.decimal 'fisika2'
+ t.decimal 'fisika3'
+ t.decimal 'fisika4'
+ t.decimal 'fisika5'
+ t.decimal 'kimia1'
+ t.decimal 'kimia2'
+ t.decimal 'kimia3'
+ t.decimal 'kimia4'
+ t.decimal 'kimia5'
+ t.decimal 'inggris1'
+ t.decimal 'inggris2'
+ t.decimal 'inggris3'
+ t.decimal 'inggris4'
+ t.decimal 'inggris5'
+ 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_semester1'
+ t.decimal 'jumlah_nilai_semester2'
+ t.decimal 'jumlah_nilai_semester3'
+ t.decimal 'jumlah_nilai_semester4'
+ t.decimal 'jumlah_nilai_semester5'
+ t.integer 'jumlah_pelajaran_semester1'
+ t.integer 'jumlah_pelajaran_semester2'
+ t.integer 'jumlah_pelajaran_semester3'
+ t.integer 'jumlah_pelajaran_semester4'
+ t.integer 'jumlah_pelajaran_semester5'
+ 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_semester5'
+ t.decimal 'jumlah_nilai_semester5'
+ 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_semester6'
+ t.decimal 'jumlah_nilai_semester6'
+ 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/achievements_controller_test.rb b/test/controllers/achievements_controller_test.rb
index 66ac017..c6e81cc 100644
--- a/test/controllers/achievements_controller_test.rb
+++ b/test/controllers/achievements_controller_test.rb
@@ -13,7 +13,7 @@ def setup
end
test 'should get edit' do
- assert is_logged_in?
+ assert logged_in?
puts users(:michael).inspect # This will print the michael user to the console
get edit_achievement_path achievements(:first_achievement)
assert_response :success
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/controllers/organizations_controller_test.rb b/test/controllers/organizations_controller_test.rb
index 17925bc..c7554c5 100644
--- a/test/controllers/organizations_controller_test.rb
+++ b/test/controllers/organizations_controller_test.rb
@@ -14,7 +14,7 @@ def setup
assert_response :success
end
test 'should get edit' do
- assert is_logged_in?
+ assert logged_in?
get edit_organization_path(organizations(:one))
assert_response :success
end
diff --git a/test/controllers/parents_controller_test.rb b/test/controllers/parents_controller_test.rb
index d6e87bd..5ff2373 100644
--- a/test/controllers/parents_controller_test.rb
+++ b/test/controllers/parents_controller_test.rb
@@ -8,7 +8,7 @@ def setup
post login_path, params: { session: { email: users(:archer).email, password: 'password' } }
end
test 'should get new' do
- assert is_logged_in?
+ assert logged_in?
get new_parent_path
assert_response :success
end
@@ -16,7 +16,7 @@ def setup
test 'should get edit' do
get login_path
post login_path, params: { session: { email: users(:michael).email, password: 'password' } }
- assert is_logged_in?
+ assert logged_in?
get edit_parent_path(parents(:myparent))
assert_response :success
end
diff --git a/test/controllers/personal_controller_test.rb b/test/controllers/personal_controller_test.rb
index f44ac84..672750e 100644
--- a/test/controllers/personal_controller_test.rb
+++ b/test/controllers/personal_controller_test.rb
@@ -14,7 +14,7 @@ def setup
test 'should get edit' do
get login_path
post login_path, params: { session: { email: users(:michael).email, password: 'password' } }
- assert is_logged_in?
+ assert logged_in?
get edit_personal_path(personals(:one))
assert_response :success
end
diff --git a/test/controllers/pmdk_each_score_informations_controller_test.rb b/test/controllers/pmdk_each_score_informations_controller_test.rb
index b73061d..266f893 100644
--- a/test/controllers/pmdk_each_score_informations_controller_test.rb
+++ b/test/controllers/pmdk_each_score_informations_controller_test.rb
@@ -14,7 +14,7 @@ def setup
assert_response :success
end
test 'should get edit pmdk each score information' do
- assert is_logged_in?
+ assert logged_in?
get login_path
post login_path, params: { session: {
email: users(:archer).email, password: 'password'
@@ -27,58 +27,58 @@ def setup
assert_response :success
assert_difference 'PmdkEachScoreInformation.count' do
post pmdk_each_score_informations_path, params: { pmdk_each_score_information: {
- matematika_semester_1: 90, matematika_semester_2: 80,
- matematika_semester_3: 89, matematika_semester_4: 90.8,
- matematika_semester_5: 88.9, kimia_semester_1: 98.9,
- kimia_semester_2: 98.3, kimia_semester_3: 88.7,
- kimia_semester_4: 88.5, kimia_semester_5: 88.1,
- fisika_semester_1: 34.9, fisika_semester_2: 99.9,
- fisika_semester_3: 88.9, fisika_semester_4: 99.7,
- fisika_semester_5: 67.7, bahasa_inggris_semester_1: 88.5,
- bahasa_inggris_semester_2: 56.8, bahasa_inggris_semester_3: 77.2,
- bahasa_inggris_semester_4: 88.1, bahasa_inggris_semester_5: 99.3
+ matematika_semester1: 90, matematika_semester2: 80,
+ matematika_semester3: 89, matematika_semester4: 90.8,
+ matematika5: 88.9, kimia1: 98.9,
+ kimia2: 98.3, kimia3: 88.7,
+ kimia4: 88.5, kimia5: 88.1,
+ fisika1: 34.9, fisika2: 99.9,
+ fisika3: 88.9, fisika4: 99.7,
+ fisika5: 67.7, inggris1: 88.5,
+ inggris2: 56.8, inggris3: 77.2,
+ inggris4: 88.1, inggris5: 99.3
} }
end
assert_not_nil PmdkEachScoreInformation.find_by_user_id users(:michael).id
- assert_not_nil PmdkEachScoreInformation.find_by_fisika_semester_1 34.9
- assert_not_nil PmdkEachScoreInformation.find_by_fisika_semester_2 99.9
- assert_not_nil PmdkEachScoreInformation.find_by_fisika_semester_3 88.9
- assert_not_nil PmdkEachScoreInformation.find_by_fisika_semester_4 99.7
- assert_not_nil PmdkEachScoreInformation.find_by_fisika_semester_5 67.7
+ assert_not_nil PmdkEachScoreInformation.find_by_fisika1 34.9
+ assert_not_nil PmdkEachScoreInformation.find_by_fisika2 99.9
+ assert_not_nil PmdkEachScoreInformation.find_by_fisika3 88.9
+ assert_not_nil PmdkEachScoreInformation.find_by_fisika4 99.7
+ assert_not_nil PmdkEachScoreInformation.find_by_fisika5 67.7
- assert_not_nil PmdkEachScoreInformation.find_by_matematika_semester_1 90
- assert_not_nil PmdkEachScoreInformation.find_by_matematika_semester_2 80
- assert_not_nil PmdkEachScoreInformation.find_by_matematika_semester_3 89
- assert_not_nil PmdkEachScoreInformation.find_by_matematika_semester_4 90.8
- assert_not_nil PmdkEachScoreInformation.find_by_matematika_semester_5 88.9
+ assert_not_nil PmdkEachScoreInformation.find_by_matematika_semester1 90
+ assert_not_nil PmdkEachScoreInformation.find_by_matematika_semester2 80
+ assert_not_nil PmdkEachScoreInformation.find_by_matematika_semester3 89
+ assert_not_nil PmdkEachScoreInformation.find_by_matematika_semester4 90.8
+ assert_not_nil PmdkEachScoreInformation.find_by_matematika5 88.9
- assert_not_nil PmdkEachScoreInformation.find_by_kimia_semester_1 98.9
- assert_not_nil PmdkEachScoreInformation.find_by_kimia_semester_2 98.3
- assert_not_nil PmdkEachScoreInformation.find_by_kimia_semester_3 88.7
- assert_not_nil PmdkEachScoreInformation.find_by_kimia_semester_4 88.5
- assert_not_nil PmdkEachScoreInformation.find_by_kimia_semester_5 88.1
+ assert_not_nil PmdkEachScoreInformation.find_by_kimia1 98.9
+ assert_not_nil PmdkEachScoreInformation.find_by_kimia2 98.3
+ assert_not_nil PmdkEachScoreInformation.find_by_kimia3 88.7
+ assert_not_nil PmdkEachScoreInformation.find_by_kimia4 88.5
+ assert_not_nil PmdkEachScoreInformation.find_by_kimia5 88.1
- assert_not_nil PmdkEachScoreInformation.find_by_bahasa_inggris_semester_1 88.5
- assert_not_nil PmdkEachScoreInformation.find_by_bahasa_inggris_semester_2 56.8
- assert_not_nil PmdkEachScoreInformation.find_by_bahasa_inggris_semester_3 77.2
- assert_not_nil PmdkEachScoreInformation.find_by_bahasa_inggris_semester_4 88.1
- assert_not_nil PmdkEachScoreInformation.find_by_bahasa_inggris_semester_5 99.3
+ assert_not_nil PmdkEachScoreInformation.find_by_inggris1 88.5
+ assert_not_nil PmdkEachScoreInformation.find_by_inggris2 56.8
+ assert_not_nil PmdkEachScoreInformation.find_by_inggris3 77.2
+ assert_not_nil PmdkEachScoreInformation.find_by_inggris4 88.1
+ assert_not_nil PmdkEachScoreInformation.find_by_inggris5 99.3
end
test 'should create new pmdk each score information but reject non-permited params' do
get new_pmdk_each_score_information_path
assert_response :success
assert_difference 'PmdkEachScoreInformation.count' do
post pmdk_each_score_informations_path, params: { pmdk_each_score_information: {
- matematika_semester_1: 90, matematika_semester_2: 80,
- matematika_semester_3: 89, matematika_semester_4: 90.8,
- matematika_semester_5: 88.9, kimia_semester_1: 98.9,
- kimia_semester_2: 98.3, kimia_semester_3: 88.7,
- kimia_semester_4: 88.5, kimia_semester_5: 88.1,
- fisika_semester_1: 34.9, fisika_semester_2: 99.9,
- fisika_semester_3: 88.9, fisika_semester_4: 99.7,
- fisika_semester_5: 67.7, bahasa_inggris_semester_1: 88.5,
- bahasa_inggris_semester_2: 56.8, bahasa_inggris_semester_3: 77.2,
- bahasa_inggris_semester_4: 88.1, bahasa_inggris_semester_5: 99.3, user_id: 9_888_090
+ matematika_semester1: 90, matematika_semester2: 80,
+ matematika_semester3: 89, matematika_semester4: 90.8,
+ matematika5: 88.9, kimia1: 98.9,
+ kimia2: 98.3, kimia3: 88.7,
+ kimia4: 88.5, kimia5: 88.1,
+ fisika1: 34.9, fisika2: 99.9,
+ fisika3: 88.9, fisika4: 99.7,
+ fisika5: 67.7, inggris1: 88.5,
+ inggris2: 56.8, inggris3: 77.2,
+ inggris4: 88.1, inggris5: 99.3, user_id: 9_888_090
} }
end
assert_nil PmdkEachScoreInformation.find_by_user_id 9_888_090
@@ -88,19 +88,19 @@ def setup
assert_response :success
assert_no_difference 'PmdkEachScoreInformation.count' do
post pmdk_each_score_informations_path, params: { pmdk_each_score_information: {
- matematika_semester_1: 90.12, matematika_semester_2: 0,
- matematika_semester_3: 89, matematika_semester_4: 90.8,
- matematika_semester_5: 88.9, kimia_semester_1: 98.9,
- kimia_semester_2: 98.3, kimia_semester_3: 88.7,
- kimia_semester_4: 88.5, kimia_semester_5: 88.1,
- fisika_semester_1: 34.9, fisika_semester_2: 99.9,
- fisika_semester_3: 88.9, fisika_semester_4: 99.7,
- fisika_semester_5: 67.7, bahasa_inggris_semester_1: 88.5,
- bahasa_inggris_semester_2: 56.8, bahasa_inggris_semester_3: 77.2,
- bahasa_inggris_semester_4: 88.1, bahasa_inggris_semester_5: 99.3
+ matematika_semester1: 90.12, matematika_semester2: 0,
+ matematika_semester3: 89, matematika_semester4: 90.8,
+ matematika5: 88.9, kimia1: 98.9,
+ kimia2: 98.3, kimia3: 88.7,
+ kimia4: 88.5, kimia5: 88.1,
+ fisika1: 34.9, fisika2: 99.9,
+ fisika3: 88.9, fisika4: 99.7,
+ fisika5: 67.7, inggris1: 88.5,
+ inggris2: 56.8, inggris3: 77.2,
+ inggris4: 88.1, inggris5: 99.3
} }
end
- assert_nil PmdkEachScoreInformation.find_by_matematika_semester_1 90.12
+ assert_nil PmdkEachScoreInformation.find_by_matematika_semester1 90.12
end
test 'should update each pmdk score information' do
get login_path
@@ -111,29 +111,29 @@ def setup
assert_response :success
patch pmdk_each_score_information_path(pmdk_each_score_informations(:pmdk_each_score_one)),
params: { pmdk_each_score_information: {
- matematika_semester_1: 90.12, matematika_semester_2: 17.8,
- matematika_semester_3: 89, matematika_semester_4: 90.8,
- matematika_semester_5: 88.9, kimia_semester_1: 98.9,
- kimia_semester_2: 98.3, kimia_semester_3: 88.7,
- kimia_semester_4: 88.5, kimia_semester_5: 88.1,
- fisika_semester_1: 34.9, fisika_semester_2: 99.9,
- fisika_semester_3: 88.9, fisika_semester_4: 99.7,
- fisika_semester_5: 67.7, bahasa_inggris_semester_1: 88.5,
- bahasa_inggris_semester_2: 56.8, bahasa_inggris_semester_3: 77.2,
- bahasa_inggris_semester_4: 88.1, bahasa_inggris_semester_5: 99.3
+ matematika_semester1: 90.12, matematika_semester2: 17.8,
+ matematika_semester3: 89, matematika_semester4: 90.8,
+ matematika5: 88.9, kimia1: 98.9,
+ kimia2: 98.3, kimia3: 88.7,
+ kimia4: 88.5, kimia5: 88.1,
+ fisika1: 34.9, fisika2: 99.9,
+ fisika3: 88.9, fisika4: 99.7,
+ fisika5: 67.7, inggris1: 88.5,
+ inggris2: 56.8, inggris3: 77.2,
+ inggris4: 88.1, inggris5: 99.3
} }
pmdk_each_score_informations(:pmdk_each_score_one).reload
- assert_equal 90.12, pmdk_each_score_informations(:pmdk_each_score_one).matematika_semester_1
- assert_equal 17.8, pmdk_each_score_informations(:pmdk_each_score_one).matematika_semester_2
- assert_equal 89, pmdk_each_score_informations(:pmdk_each_score_one).matematika_semester_3
- assert_equal 90.8, pmdk_each_score_informations(:pmdk_each_score_one).matematika_semester_4
- assert_equal 88.9, pmdk_each_score_informations(:pmdk_each_score_one).matematika_semester_5
+ assert_equal 90.12, pmdk_each_score_informations(:pmdk_each_score_one).matematika_semester1
+ assert_equal 17.8, pmdk_each_score_informations(:pmdk_each_score_one).matematika_semester2
+ assert_equal 89, pmdk_each_score_informations(:pmdk_each_score_one).matematika_semester3
+ assert_equal 90.8, pmdk_each_score_informations(:pmdk_each_score_one).matematika_semester4
+ assert_equal 88.9, pmdk_each_score_informations(:pmdk_each_score_one).matematika5
- assert_equal 99.3, pmdk_each_score_informations(:pmdk_each_score_one).bahasa_inggris_semester_5
- assert_equal 88.1, pmdk_each_score_informations(:pmdk_each_score_one).bahasa_inggris_semester_4
- assert_equal 77.2, pmdk_each_score_informations(:pmdk_each_score_one).bahasa_inggris_semester_3
- assert_equal 56.8, pmdk_each_score_informations(:pmdk_each_score_one).bahasa_inggris_semester_2
- assert_equal 88.5, pmdk_each_score_informations(:pmdk_each_score_one).bahasa_inggris_semester_1
+ assert_equal 99.3, pmdk_each_score_informations(:pmdk_each_score_one).inggris5
+ assert_equal 88.1, pmdk_each_score_informations(:pmdk_each_score_one).inggris4
+ assert_equal 77.2, pmdk_each_score_informations(:pmdk_each_score_one).inggris3
+ assert_equal 56.8, pmdk_each_score_informations(:pmdk_each_score_one).inggris2
+ assert_equal 88.5, pmdk_each_score_informations(:pmdk_each_score_one).inggris1
end
test 'should reject to update each pmdk score for invalid data' do
get login_path
@@ -144,19 +144,19 @@ def setup
assert_response :success
patch pmdk_each_score_information_path(pmdk_each_score_informations(:pmdk_each_score_one)),
params: { pmdk_each_score_information: {
- matematika_semester_1: 90.12, matematika_semester_2: 17.8,
- matematika_semester_3: 89, matematika_semester_4: 90.8,
- matematika_semester_5: 88.9, kimia_semester_1: 98.9,
- kimia_semester_2: 98.3, kimia_semester_3: 88.7,
- kimia_semester_4: 88.5, kimia_semester_5: 88.1,
- fisika_semester_1: 34.9, fisika_semester_2: 99.9,
- fisika_semester_3: 88.9, fisika_semester_4: 99.7,
- fisika_semester_5: 67.7, bahasa_inggris_semester_1: 88.5,
- bahasa_inggris_semester_2: 56.8, bahasa_inggris_semester_3: 77.2,
- bahasa_inggris_semester_4: 88.1, bahasa_inggris_semester_5: 0
+ matematika_semester1: 90.12, matematika_semester2: 17.8,
+ matematika_semester3: 89, matematika_semester4: 90.8,
+ matematika5: 88.9, kimia1: 98.9,
+ kimia2: 98.3, kimia3: 88.7,
+ kimia4: 88.5, kimia5: 88.1,
+ fisika1: 34.9, fisika2: 99.9,
+ fisika3: 88.9, fisika4: 99.7,
+ fisika5: 67.7, inggris1: 88.5,
+ inggris2: 56.8, inggris3: 77.2,
+ inggris4: 88.1, inggris5: 0
} }
pmdk_each_score_informations(:pmdk_each_score_one).reload
- assert_not_equal 0, pmdk_each_score_informations(:pmdk_each_score_one).bahasa_inggris_semester_5
+ assert_not_equal 0, pmdk_each_score_informations(:pmdk_each_score_one).inggris5
end
test 'should reject non-permited params during update each pmdk score' do
get login_path
@@ -167,16 +167,16 @@ def setup
assert_response :success
patch pmdk_each_score_information_path(pmdk_each_score_informations(:pmdk_each_score_one)),
params: { pmdk_each_score_information: {
- matematika_semester_1: 90.12, matematika_semester_2: 17.8,
- matematika_semester_3: 89, matematika_semester_4: 90.8,
- matematika_semester_5: 88.9, kimia_semester_1: 98.9,
- kimia_semester_2: 98.3, kimia_semester_3: 88.7,
- kimia_semester_4: 88.5, kimia_semester_5: 88.1,
- fisika_semester_1: 34.9, fisika_semester_2: 99.9,
- fisika_semester_3: 88.9, fisika_semester_4: 99.7,
- fisika_semester_5: 67.7, bahasa_inggris_semester_1: 88.5,
- bahasa_inggris_semester_2: 56.8, bahasa_inggris_semester_3: 77.2,
- bahasa_inggris_semester_4: 88.1, bahasa_inggris_semester_5: 89, user_id: 888_999_569
+ matematika_semester1: 90.12, matematika_semester2: 17.8,
+ matematika_semester3: 89, matematika_semester4: 90.8,
+ matematika5: 88.9, kimia1: 98.9,
+ kimia2: 98.3, kimia3: 88.7,
+ kimia4: 88.5, kimia5: 88.1,
+ fisika1: 34.9, fisika2: 99.9,
+ fisika3: 88.9, fisika4: 99.7,
+ fisika5: 67.7, inggris1: 88.5,
+ inggris2: 56.8, inggris3: 77.2,
+ inggris4: 88.1, inggris5: 89, user_id: 888_999_569
} }
pmdk_each_score_informations(:pmdk_each_score_one).reload
assert_not_equal 888_999_569, pmdk_each_score_informations(:pmdk_each_score_one).user_id
diff --git a/test/controllers/pmdk_school_informations_controller_test.rb b/test/controllers/pmdk_school_informations_controller_test.rb
index c5f5caf..3677e66 100644
--- a/test/controllers/pmdk_school_informations_controller_test.rb
+++ b/test/controllers/pmdk_school_informations_controller_test.rb
@@ -19,7 +19,7 @@ def setup
post login_path, params: { session: {
email: users(:archer).email, password: 'password'
} }
- assert is_logged_in?
+ assert logged_in?
get edit_pmdk_school_information_path(pmdk_school_informations(:pmdk_sc_one))
assert_response :success
patch pmdk_school_information_path(pmdk_school_informations(:pmdk_sc_one)),
@@ -39,7 +39,7 @@ def setup
post login_path, params: { session: {
email: users(:iana).email, password: 'password'
} }
- assert is_logged_in?
+ assert logged_in?
get edit_pmdk_school_information_path(pmdk_school_informations(:pmdk_sc_two))
assert_response :success
patch pmdk_school_information_path(pmdk_school_informations(:pmdk_sc_two)),
@@ -107,7 +107,7 @@ def setup
post login_path, params: { session: {
email: users(:archer).email, password: 'password'
} }
- assert is_logged_in?
+ assert logged_in?
get edit_pmdk_school_information_path(pmdk_school_informations(:pmdk_sc_one))
assert_response :success
end
diff --git a/test/controllers/pmdk_total_score_informations_controller_test.rb b/test/controllers/pmdk_total_score_informations_controller_test.rb
index 6a44da8..05239a3 100644
--- a/test/controllers/pmdk_total_score_informations_controller_test.rb
+++ b/test/controllers/pmdk_total_score_informations_controller_test.rb
@@ -18,7 +18,7 @@ def setup
post login_path, params: { session: {
email: users(:archer).email, password: 'password'
} }
- assert is_logged_in?
+ assert logged_in?
get edit_pmdk_total_score_information_path(pmdk_total_score_informations(:pmdk_total_one))
assert_response :success
end
@@ -28,26 +28,26 @@ def setup
assert_difference 'PmdkTotalScoreInformation.count' do
post pmdk_total_score_informations_path, params: {
pmdk_total_score_information: {
- jumlah_nilai_semester_1: 120.5,
- jumlah_nilai_semester_2: 122.5, jumlah_nilai_semester_3: 130.9,
- jumlah_nilai_semester_4: 189.9, jumlah_nilai_semester_5: 189.98,
- jumlah_pelajaran_semester_1: 3, jumlah_pelajaran_semester_2: 6,
- jumlah_pelajaran_semester_3: 12, jumlah_pelajaran_semester_4: 15,
- jumlah_pelajaran_semester_5: 14
+ jumlah_nilai_semester1: 120.5,
+ jumlah_nilai_semester2: 122.5, jumlah_nilai_semester3: 130.9,
+ jumlah_nilai_semester4: 189.9, jumlah_nilai_semester5: 189.98,
+ jumlah_pelajaran_semester1: 3, jumlah_pelajaran_semester2: 6,
+ jumlah_pelajaran_semester3: 12, jumlah_pelajaran_semester4: 15,
+ jumlah_pelajaran_semester5: 14
}
}
end
- assert_not_nil PmdkTotalScoreInformation.find_by_jumlah_nilai_semester_1 120.5
- assert_not_nil PmdkTotalScoreInformation.find_by_jumlah_nilai_semester_2 122.5
- assert_not_nil PmdkTotalScoreInformation.find_by_jumlah_nilai_semester_3 130.9
- assert_not_nil PmdkTotalScoreInformation.find_by_jumlah_nilai_semester_4 189.9
- assert_not_nil PmdkTotalScoreInformation.find_by_jumlah_nilai_semester_5 189.98
+ assert_not_nil PmdkTotalScoreInformation.find_by_jumlah_nilai_semester1 120.5
+ assert_not_nil PmdkTotalScoreInformation.find_by_jumlah_nilai_semester2 122.5
+ assert_not_nil PmdkTotalScoreInformation.find_by_jumlah_nilai_semester3 130.9
+ assert_not_nil PmdkTotalScoreInformation.find_by_jumlah_nilai_semester4 189.9
+ assert_not_nil PmdkTotalScoreInformation.find_by_jumlah_nilai_semester5 189.98
- assert_not_nil PmdkTotalScoreInformation.find_by_jumlah_pelajaran_semester_1 3
- assert_not_nil PmdkTotalScoreInformation.find_by_jumlah_pelajaran_semester_2 6
- assert_not_nil PmdkTotalScoreInformation.find_by_jumlah_pelajaran_semester_3 12
- assert_not_nil PmdkTotalScoreInformation.find_by_jumlah_pelajaran_semester_4 15
- assert_not_nil PmdkTotalScoreInformation.find_by_jumlah_pelajaran_semester_5 14
+ assert_not_nil PmdkTotalScoreInformation.find_by_jumlah_pelajaran_semester1 3
+ assert_not_nil PmdkTotalScoreInformation.find_by_jumlah_pelajaran_semester2 6
+ assert_not_nil PmdkTotalScoreInformation.find_by_jumlah_pelajaran_semester3 12
+ assert_not_nil PmdkTotalScoreInformation.find_by_jumlah_pelajaran_semester4 15
+ assert_not_nil PmdkTotalScoreInformation.find_by_jumlah_pelajaran_semester5 14
end
test 'should reject non permited params while create total pmdk score' do
get new_pmdk_total_score_information_path
@@ -55,12 +55,12 @@ def setup
assert_difference 'PmdkTotalScoreInformation.count' do
post pmdk_total_score_informations_path, params: {
pmdk_total_score_information: {
- jumlah_nilai_semester_1: 120.5,
- jumlah_nilai_semester_2: 122.5, jumlah_nilai_semester_3: 130.9,
- jumlah_nilai_semester_4: 189.9, jumlah_nilai_semester_5: 189.98,
- jumlah_pelajaran_semester_1: 3, jumlah_pelajaran_semester_2: 6,
- jumlah_pelajaran_semester_3: 12, jumlah_pelajaran_semester_4: 15,
- jumlah_pelajaran_semester_5: 14, user_id: 98_999_809
+ jumlah_nilai_semester1: 120.5,
+ jumlah_nilai_semester2: 122.5, jumlah_nilai_semester3: 130.9,
+ jumlah_nilai_semester4: 189.9, jumlah_nilai_semester5: 189.98,
+ jumlah_pelajaran_semester1: 3, jumlah_pelajaran_semester2: 6,
+ jumlah_pelajaran_semester3: 12, jumlah_pelajaran_semester4: 15,
+ jumlah_pelajaran_semester5: 14, user_id: 98_999_809
}
}
end
@@ -72,17 +72,17 @@ def setup
assert_no_difference 'PmdkTotalScoreInformation.count' do
post pmdk_total_score_informations_path, params: {
pmdk_total_score_information: {
- jumlah_nilai_semester_1: 0,
- jumlah_nilai_semester_2: 122.5, jumlah_nilai_semester_3: 130.9,
- jumlah_nilai_semester_4: 189.9, jumlah_nilai_semester_5: 189.98,
- jumlah_pelajaran_semester_1: 3, jumlah_pelajaran_semester_2: 6,
- jumlah_pelajaran_semester_3: 12, jumlah_pelajaran_semester_4: 15,
- jumlah_pelajaran_semester_5: 14
+ jumlah_nilai_semester1: 0,
+ jumlah_nilai_semester2: 122.5, jumlah_nilai_semester3: 130.9,
+ jumlah_nilai_semester4: 189.9, jumlah_nilai_semester5: 189.98,
+ jumlah_pelajaran_semester1: 3, jumlah_pelajaran_semester2: 6,
+ jumlah_pelajaran_semester3: 12, jumlah_pelajaran_semester4: 15,
+ jumlah_pelajaran_semester5: 14
}
}
end
- assert_nil PmdkTotalScoreInformation.find_by_jumlah_nilai_semester_1 0
- assert_nil PmdkTotalScoreInformation.find_by_jumlah_nilai_semester_3 130.9
+ assert_nil PmdkTotalScoreInformation.find_by_jumlah_nilai_semester1 0
+ assert_nil PmdkTotalScoreInformation.find_by_jumlah_nilai_semester3 130.9
end
test 'should update pmdk total score information' do
get login_path
@@ -93,25 +93,25 @@ def setup
assert_response :success
patch pmdk_total_score_information_path(pmdk_total_score_informations(:pmdk_total_one)), params: {
pmdk_total_score_information: {
- jumlah_nilai_semester_1: 120.5,
- jumlah_nilai_semester_2: 122.5, jumlah_nilai_semester_3: 130.9,
- jumlah_nilai_semester_4: 189.9, jumlah_nilai_semester_5: 189.98,
- jumlah_pelajaran_semester_1: 3, jumlah_pelajaran_semester_2: 6,
- jumlah_pelajaran_semester_3: 12, jumlah_pelajaran_semester_4: 15,
- jumlah_pelajaran_semester_5: 14
+ jumlah_nilai_semester1: 120.5,
+ jumlah_nilai_semester2: 122.5, jumlah_nilai_semester3: 130.9,
+ jumlah_nilai_semester4: 189.9, jumlah_nilai_semester5: 189.98,
+ jumlah_pelajaran_semester1: 3, jumlah_pelajaran_semester2: 6,
+ jumlah_pelajaran_semester3: 12, jumlah_pelajaran_semester4: 15,
+ jumlah_pelajaran_semester5: 14
}
}
pmdk_total_score_informations(:pmdk_total_one).reload
- assert_equal 120.5, pmdk_total_score_informations(:pmdk_total_one).jumlah_nilai_semester_1
- assert_equal 122.5, pmdk_total_score_informations(:pmdk_total_one).jumlah_nilai_semester_2
- assert_equal 130.9, pmdk_total_score_informations(:pmdk_total_one).jumlah_nilai_semester_3
- assert_equal 189.9, pmdk_total_score_informations(:pmdk_total_one).jumlah_nilai_semester_4
- assert_equal 189.98, pmdk_total_score_informations(:pmdk_total_one).jumlah_nilai_semester_5
- assert_equal 3, pmdk_total_score_informations(:pmdk_total_one).jumlah_pelajaran_semester_1
- assert_equal 6, pmdk_total_score_informations(:pmdk_total_one).jumlah_pelajaran_semester_2
- assert_equal 12, pmdk_total_score_informations(:pmdk_total_one).jumlah_pelajaran_semester_3
- assert_equal 15, pmdk_total_score_informations(:pmdk_total_one).jumlah_pelajaran_semester_4
- assert_equal 14, pmdk_total_score_informations(:pmdk_total_one).jumlah_pelajaran_semester_5
+ assert_equal 120.5, pmdk_total_score_informations(:pmdk_total_one).jumlah_nilai_semester1
+ assert_equal 122.5, pmdk_total_score_informations(:pmdk_total_one).jumlah_nilai_semester2
+ assert_equal 130.9, pmdk_total_score_informations(:pmdk_total_one).jumlah_nilai_semester3
+ assert_equal 189.9, pmdk_total_score_informations(:pmdk_total_one).jumlah_nilai_semester4
+ assert_equal 189.98, pmdk_total_score_informations(:pmdk_total_one).jumlah_nilai_semester5
+ assert_equal 3, pmdk_total_score_informations(:pmdk_total_one).jumlah_pelajaran_semester1
+ assert_equal 6, pmdk_total_score_informations(:pmdk_total_one).jumlah_pelajaran_semester2
+ assert_equal 12, pmdk_total_score_informations(:pmdk_total_one).jumlah_pelajaran_semester3
+ assert_equal 15, pmdk_total_score_informations(:pmdk_total_one).jumlah_pelajaran_semester4
+ assert_equal 14, pmdk_total_score_informations(:pmdk_total_one).jumlah_pelajaran_semester5
end
test 'should not update non-permited params for total score pmdk' do
get login_path
@@ -122,12 +122,12 @@ def setup
assert_response :success
patch pmdk_total_score_information_path(pmdk_total_score_informations(:pmdk_total_one)), params: {
pmdk_total_score_information: {
- jumlah_nilai_semester_1: 120.5,
- jumlah_nilai_semester_2: 122.5, jumlah_nilai_semester_3: 130.9,
- jumlah_nilai_semester_4: 189.9, jumlah_nilai_semester_5: 189.98,
- jumlah_pelajaran_semester_1: 3, jumlah_pelajaran_semester_2: 6,
- jumlah_pelajaran_semester_3: 12, jumlah_pelajaran_semester_4: 15,
- jumlah_pelajaran_semester_5: 14, user_id: 9_888_898_910
+ jumlah_nilai_semester1: 120.5,
+ jumlah_nilai_semester2: 122.5, jumlah_nilai_semester3: 130.9,
+ jumlah_nilai_semester4: 189.9, jumlah_nilai_semester5: 189.98,
+ jumlah_pelajaran_semester1: 3, jumlah_pelajaran_semester2: 6,
+ jumlah_pelajaran_semester3: 12, jumlah_pelajaran_semester4: 15,
+ jumlah_pelajaran_semester5: 14, user_id: 9_888_898_910
}
}
assert_not_equal 9_888_898_910, pmdk_total_score_informations(:pmdk_total_one).reload.user_id
@@ -141,15 +141,15 @@ def setup
assert_response :success
patch pmdk_total_score_information_path(pmdk_total_score_informations(:pmdk_total_one)), params: {
pmdk_total_score_information: {
- jumlah_nilai_semester_1: 120.5,
- jumlah_nilai_semester_2: 122.5, jumlah_nilai_semester_3: 130.9,
- jumlah_nilai_semester_4: 189.9, jumlah_nilai_semester_5: 189.98,
- jumlah_pelajaran_semester_1: 3, jumlah_pelajaran_semester_2: 6,
- jumlah_pelajaran_semester_3: 12, jumlah_pelajaran_semester_4: 15,
- jumlah_pelajaran_semester_5: 0
+ jumlah_nilai_semester1: 120.5,
+ jumlah_nilai_semester2: 122.5, jumlah_nilai_semester3: 130.9,
+ jumlah_nilai_semester4: 189.9, jumlah_nilai_semester5: 189.98,
+ jumlah_pelajaran_semester1: 3, jumlah_pelajaran_semester2: 6,
+ jumlah_pelajaran_semester3: 12, jumlah_pelajaran_semester4: 15,
+ jumlah_pelajaran_semester5: 0
}
}
- assert_not_equal 0, pmdk_total_score_informations(:pmdk_total_one).reload.jumlah_pelajaran_semester_5
+ assert_not_equal 0, pmdk_total_score_informations(:pmdk_total_one).reload.jumlah_pelajaran_semester5
end
# test "should get show" do
# get pmdk_total_score_informations_show_url
diff --git a/test/controllers/sources_controller_test.rb b/test/controllers/sources_controller_test.rb
index c30a0d7..59b4e90 100644
--- a/test/controllers/sources_controller_test.rb
+++ b/test/controllers/sources_controller_test.rb
@@ -17,7 +17,7 @@ def setup
test 'should get edit' do
get login_path
post login_path, params: { session: { email: users(:michael).email, password: 'password' } }
- assert is_logged_in?
+ assert logged_in?
get edit_source_path(sources(:one))
assert_response :success
end
diff --git a/test/controllers/usm_school_informations_controller_test.rb b/test/controllers/usm_school_informations_controller_test.rb
index c33c058..7211d72 100644
--- a/test/controllers/usm_school_informations_controller_test.rb
+++ b/test/controllers/usm_school_informations_controller_test.rb
@@ -10,7 +10,7 @@ def setup
} }
end
test 'should get new usm school information' do
- assert is_logged_in?
+ assert logged_in?
get new_usm_school_information_url
assert_response :success
end
@@ -20,7 +20,7 @@ def setup
post login_path, params: { session: {
email: users(:archer).email, password: 'password'
} }
- assert is_logged_in?
+ assert logged_in?
get edit_usm_school_information_url(usm_school_informations(:usm_one))
assert_response :success
end
@@ -31,15 +31,15 @@ def setup
post usm_school_informations_path, params: {
usm_school_information: {
jurusan_sekolah: 'ipa MA', asal_sekolah: 'sma santo tomas 2', akreditas: 'terakreditasi',
- jumlah_pelajaran_semester_5: 15, jumlah_nilai_semester_5: 799.9
+ jumlah_pelajaran_semester5: 15, jumlah_nilai_semester5: 799.9
}
}
end
assert_equal 'usm school information is saved', flash[:success]
assert_not_nil UsmSchoolInformation.find_by_jurusan_sekolah 'ipa MA'
assert_not_nil UsmSchoolInformation.find_by_asal_sekolah 'sma santo tomas 2'
- assert_not_nil UsmSchoolInformation.find_by_jumlah_pelajaran_semester_5 15
- assert_not_nil UsmSchoolInformation.find_by_jumlah_nilai_semester_5 799.9
+ assert_not_nil UsmSchoolInformation.find_by_jumlah_pelajaran_semester5 15
+ assert_not_nil UsmSchoolInformation.find_by_jumlah_nilai_semester5 799.9
end
test 'should reject for invalid usm school information' do
get new_usm_school_information_url
@@ -48,7 +48,7 @@ def setup
post usm_school_informations_path, params: {
usm_school_information: {
jurusan_sekolah: 'ipa MA', asal_sekolah: 'sma santo tomas 2', akreditas: 'terakreditasi',
- jumlah_pelajaran_semester_5: 15, jumlah_nilai_semester_5: 0
+ jumlah_pelajaran_semester5: 15, jumlah_nilai_semester5: 0
}
}
end
@@ -60,7 +60,7 @@ def setup
post usm_school_informations_path, params: {
usm_school_information: {
jurusan_sekolah: 'ipa MA', asal_sekolah: 'sma santo tomas 2', akreditas: 'terakreditasi',
- jumlah_pelajaran_semester_5: 15, jumlah_nilai_semester_5: 799.9, user_id: 87_999_822
+ jumlah_pelajaran_semester5: 15, jumlah_nilai_semester5: 799.9, user_id: 87_999_822
}
}
end
@@ -71,13 +71,13 @@ def setup
post login_path, params: { session: {
email: users(:archer).email, password: 'password'
} }
- assert is_logged_in?
+ assert logged_in?
get edit_usm_school_information_url(usm_school_informations(:usm_one))
assert_response :success
patch usm_school_information_path(usm_school_informations(:usm_one)), params: {
usm_school_information: {
jurusan_sekolah: 'ipa MA', asal_sekolah: 'sma santo tomas 2', akreditas: 'terakreditasi',
- jumlah_pelajaran_semester_5: 15, jumlah_nilai_semester_5: 799.9
+ jumlah_pelajaran_semester5: 15, jumlah_nilai_semester5: 799.9
}
}
assert_equal 'usm school information is updated', flash[:success]
@@ -85,21 +85,21 @@ def setup
assert_equal 'ipa MA', usm_school_informations(:usm_one).reload.jurusan_sekolah
assert_equal 'sma santo tomas 2', usm_school_informations(:usm_one).asal_sekolah
assert_equal 'terakreditasi', usm_school_informations(:usm_one).akreditas
- assert_equal 15, usm_school_informations(:usm_one).jumlah_pelajaran_semester_5
- assert_equal 799.9, usm_school_informations(:usm_one).jumlah_nilai_semester_5
+ assert_equal 15, usm_school_informations(:usm_one).jumlah_pelajaran_semester5
+ assert_equal 799.9, usm_school_informations(:usm_one).jumlah_nilai_semester5
end
test 'should reject non permited params during update usm school information' do
get login_path
post login_path, params: { session: {
email: users(:archer).email, password: 'password'
} }
- assert is_logged_in?
+ assert logged_in?
get edit_usm_school_information_url(usm_school_informations(:usm_one))
assert_response :success
patch usm_school_information_path(usm_school_informations(:usm_one)), params: {
usm_school_information: {
jurusan_sekolah: 'ipa MA', asal_sekolah: 'sma santo tomas 2', akreditas: 'terakreditasi',
- jumlah_pelajaran_semester_5: 15, jumlah_nilai_semester_5: 799.9, user_id: 9_990_998
+ jumlah_pelajaran_semester5: 15, jumlah_nilai_semester5: 799.9, user_id: 9_990_998
}
}
usm_school_informations(:usm_one).reload
@@ -110,13 +110,13 @@ def setup
post login_path, params: { session: {
email: users(:archer).email, password: 'password'
} }
- assert is_logged_in?
+ assert logged_in?
get edit_usm_school_information_url(usm_school_informations(:usm_one))
assert_response :success
patch usm_school_information_path(usm_school_informations(:usm_one)), params: {
usm_school_information: {
jurusan_sekolah: 'ipa MA', asal_sekolah: 'sm', akreditas: 'terakreditasi',
- jumlah_pelajaran_semester_5: 15, jumlah_nilai_semester_5: 799.9
+ jumlah_pelajaran_semester5: 15, jumlah_nilai_semester5: 799.9
}
}
assert_not_equal 'sm', usm_school_informations(:usm_one).reload.asal_sekolah
diff --git a/test/controllers/utbk_school_informations_controller_test.rb b/test/controllers/utbk_school_informations_controller_test.rb
index c830746..b6d1b2c 100644
--- a/test/controllers/utbk_school_informations_controller_test.rb
+++ b/test/controllers/utbk_school_informations_controller_test.rb
@@ -19,7 +19,7 @@ def setup
post login_path, params: { session: {
email: users(:archer).email, password: 'password'
} }
- assert is_logged_in?
+ assert logged_in?
get edit_utbk_school_information_url(utbk_school_informations(:utbk_sc_one))
assert_response :success
patch utbk_school_information_path(utbk_school_informations(:utbk_sc_one)), params: {
@@ -38,7 +38,7 @@ def setup
post login_path, params: { session: {
email: users(:archer).email, password: 'password'
} }
- assert is_logged_in?
+ assert logged_in?
get edit_utbk_school_information_url(utbk_school_informations(:utbk_sc_one))
assert_response :success
patch utbk_school_information_path(utbk_school_informations(:utbk_sc_one)), params: {
@@ -54,7 +54,7 @@ def setup
post login_path, params: { session: {
email: users(:archer).email, password: 'password'
} }
- assert is_logged_in?
+ assert logged_in?
get edit_utbk_school_information_url(utbk_school_informations(:utbk_sc_one))
assert_response :success
patch utbk_school_information_path(utbk_school_informations(:utbk_sc_one)), params: {
diff --git a/test/controllers/utbk_scores_controller_test.rb b/test/controllers/utbk_scores_controller_test.rb
index 9b54cfb..68a3658 100644
--- a/test/controllers/utbk_scores_controller_test.rb
+++ b/test/controllers/utbk_scores_controller_test.rb
@@ -10,7 +10,7 @@ def setup
} }
end
test 'should get new score' do
- assert is_logged_in?
+ assert logged_in?
get new_utbk_score_url
assert_response :success
end
@@ -24,15 +24,15 @@ def setup
assert_response :success
patch utbk_score_path, params: {
utbk_score: { no_peserta: '200-1bx-2', tanggal_ujian: '2021-12-11',
- jumlah_nilai_semester_6: 1000.5, jumlah_pelajaran_semester_6: 15,
+ jumlah_nilai_semester6: 1000.5, jumlah_pelajaran_semester6: 15,
nilai_penalaran_umum: 190.5,
nilai_pengetahuan_kuantitatif: 110.5,
nilai_kemampuan_memahami_bacaan_dan_menulis: 100.5,
nilai_pengetahuan_dan_pemahaman_umum: 150.5 }
}
assert_equal '200-1bx-2', utbk_scores(:utbk_score_one).reload.no_peserta
- assert_equal 1000.5, utbk_scores(:utbk_score_one).jumlah_nilai_semester_6
- assert_equal 15, utbk_scores(:utbk_score_one).jumlah_pelajaran_semester_6
+ assert_equal 1000.5, utbk_scores(:utbk_score_one).jumlah_nilai_semester6
+ assert_equal 15, utbk_scores(:utbk_score_one).jumlah_pelajaran_semester6
assert_equal 190.5, utbk_scores(:utbk_score_one).reload.nilai_penalaran_umum
assert_equal 110.5, utbk_scores(:utbk_score_one).reload.nilai_pengetahuan_kuantitatif
@@ -45,7 +45,7 @@ def setup
assert_difference 'UtbkScore.count' do
post utbk_scores_path, params: {
utbk_score: { no_peserta: '200-1bx-2', tanggal_ujian: '2020-12-11',
- jumlah_nilai_semester_6: 1000.5, jumlah_pelajaran_semester_6: 15,
+ jumlah_nilai_semester6: 1000.5, jumlah_pelajaran_semester6: 15,
nilai_penalaran_umum: 190.5,
nilai_pengetahuan_kuantitatif: 110.5,
nilai_kemampuan_memahami_bacaan_dan_menulis: 100.5,
@@ -53,8 +53,8 @@ def setup
}
end
assert_not_nil UtbkScore.find_by_no_peserta '200-1bx-2'
- assert_not_nil UtbkScore.find_by_jumlah_pelajaran_semester_6 15
- assert_not_nil UtbkScore.find_by_jumlah_nilai_semester_6 1000.5
+ assert_not_nil UtbkScore.find_by_jumlah_pelajaran_semester6 15
+ assert_not_nil UtbkScore.find_by_jumlah_nilai_semester6 1000.5
assert_not_nil UtbkScore.find_by_nilai_penalaran_umum 190.5
assert_not_nil UtbkScore.find_by_nilai_pengetahuan_kuantitatif 110.5
assert_not_nil UtbkScore.find_by_nilai_kemampuan_memahami_bacaan_dan_menulis 100.5
@@ -65,7 +65,7 @@ def setup
post login_path, params: { session: {
email: users(:iana).email, password: 'password'
} }
- assert is_logged_in?
+ assert logged_in?
get edit_utbk_score_url(utbk_scores(:utbk_score_two))
assert_response :success
end
@@ -75,7 +75,7 @@ def setup
assert_difference 'UtbkScore.count' do
post utbk_scores_path, params: {
utbk_score: { no_peserta: '200-1bx-2', tanggal_ujian: '2020-12-11',
- jumlah_nilai_semester_6: 1000.5, jumlah_pelajaran_semester_6: 15,
+ jumlah_nilai_semester6: 1000.5, jumlah_pelajaran_semester6: 15,
nilai_penalaran_umum: 190.5,
nilai_pengetahuan_kuantitatif: 110.5,
nilai_kemampuan_memahami_bacaan_dan_menulis: 100.5,
@@ -90,7 +90,7 @@ def setup
assert_difference 'UtbkScore.count' do
post utbk_scores_path, params: {
utbk_score: { no_peserta: '200-1bx-2', tanggal_ujian: '2020-12-11',
- jumlah_nilai_semester_6: 1000.5, jumlah_pelajaran_semester_6: 15,
+ jumlah_nilai_semester6: 1000.5, jumlah_pelajaran_semester6: 15,
nilai_penalaran_umum: 190.5,
nilai_pengetahuan_kuantitatif: 110.5,
nilai_kemampuan_memahami_bacaan_dan_menulis: 100.5,
diff --git a/test/fixtures/majors.yml b/test/fixtures/majors.yml
index 8d98445..290da2f 100644
--- a/test/fixtures/majors.yml
+++ b/test/fixtures/majors.yml
@@ -2,14 +2,14 @@
one:
user: michael
- jurusan_1: fisika
- jurusan_2: biologi
- jurusan_3: sains data
+ jurusan1: fisika
+ jurusan2: biologi
+ jurusan3: sains data
gelombang: pmdk sumut
two:
user: iana
- jurusan_1: teknik informatika
- jurusan_2: sistem informasi
- jurusan_3: teknik komputer
+ jurusan1: teknik informatika
+ jurusan2: sistem informasi
+ jurusan3: teknik komputer
gelombang: utbk
diff --git a/test/fixtures/pmdk_each_score_informations.yml b/test/fixtures/pmdk_each_score_informations.yml
index 2c424a0..f5c1373 100644
--- a/test/fixtures/pmdk_each_score_informations.yml
+++ b/test/fixtures/pmdk_each_score_informations.yml
@@ -2,8 +2,8 @@
pmdk_each_score_one:
user: archer
- matematika_semester_1: MyString
+ matematika_semester1: MyString
pmdk_each_score_two:
user: iana
- matematika_semester_1: MyString
+ matematika_semester1: MyString
diff --git a/test/fixtures/pmdk_total_score_informations.yml b/test/fixtures/pmdk_total_score_informations.yml
index 94e144a..cb93b99 100644
--- a/test/fixtures/pmdk_total_score_informations.yml
+++ b/test/fixtures/pmdk_total_score_informations.yml
@@ -2,8 +2,8 @@
pmdk_total_one:
user: archer
- jumlah_nilai_semester_1: 12
+ jumlah_nilai_semester1: 12
pmdk_total_two:
user: iana
- jumlah_nilai_semester_1: 13
+ jumlah_nilai_semester1: 13
diff --git a/test/fixtures/usm_school_informations.yml b/test/fixtures/usm_school_informations.yml
index 33dadf7..ebd3f0a 100644
--- a/test/fixtures/usm_school_informations.yml
+++ b/test/fixtures/usm_school_informations.yml
@@ -6,8 +6,8 @@ usm_one:
akreditas: MyString
jumlah_nilai_un: 9.99
jurusan_sekolah: MyString
- jumlah_pelajaran_semester_5: 1
- jumlah_nilai_semester_5: 9.99
+ jumlah_pelajaran_semester5: 1
+ jumlah_nilai_semester5: 9.99
usm_two:
user: iana
@@ -16,5 +16,5 @@ usm_two:
jumlah_pelajaran_un: 2
jumlah_nilai_un: 9.99
jurusan_sekolah: MyString
- jumlah_pelajaran_semester_5: 1
- jumlah_nilai_semester_5: 9.99
+ jumlah_pelajaran_semester5: 1
+ jumlah_nilai_semester5: 9.99
diff --git a/test/helpers/sessions_helper_test.rb b/test/helpers/sessions_helper_test.rb
index 6eaaf55..e26906e 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?
+ assert 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/integration/major_test.rb b/test/integration/major_test.rb
index 61f315c..09c33f5 100644
--- a/test/integration/major_test.rb
+++ b/test/integration/major_test.rb
@@ -14,13 +14,13 @@ def setup
assert_template 'majors/new'
assert_difference 'Major.count' do
post majors_path, params: { major: {
- jurusan_1: 'fisika', jurusan_2: 'biology', jurusan_3: 'math',
+ jurusan1: 'fisika', jurusan2: 'biology', jurusan3: 'math',
gelombang: 'pmdk sumut'
} }
end
- assert_not_nil Major.find_by_jurusan_1 'fisika'
- assert_not_nil Major.find_by_jurusan_2 'biology'
- assert_not_nil Major.find_by_jurusan_3 'math'
+ assert_not_nil Major.find_by_jurusan1 'fisika'
+ assert_not_nil Major.find_by_jurusan2 'biology'
+ assert_not_nil Major.find_by_jurusan3 'math'
assert_not_nil Major.find_by_gelombang 'pmdk sumut'
end
test 'should not create major if one major equal to each other' do
@@ -28,29 +28,29 @@ def setup
assert_template 'majors/new'
assert_no_difference 'Major.count' do
post majors_path, params: { major: {
- jurusan_1: 'fisika 1', jurusan_2: 'fisika 1', jurusan_3: 'math',
+ jurusan1: 'fisika 1', jurusan2: 'fisika 1', jurusan3: 'math',
gelombang: 'pmdk sumut'
} }
end
- assert_nil Major.find_by_jurusan_1 'fisika 1'
+ assert_nil Major.find_by_jurusan1 'fisika 1'
end
test 'should not create major for invalid information' do
get new_major_path
assert_template 'majors/new'
assert_no_difference 'Major.count' do
post majors_path, params: { major: {
- jurusan_1: 'fisika 1', jurusan_2: 'fisika 2', jurusan_3: 'mat',
+ jurusan1: 'fisika 1', jurusan2: 'fisika 2', jurusan3: 'mat',
gelombang: 'pmdk sumut'
} }
end
- assert_nil Major.find_by_jurusan_1 'mat'
+ assert_nil Major.find_by_jurusan1 'mat'
end
test 'should reject non param while create major' do
get new_major_path
assert_template 'majors/new'
assert_difference 'Major.count' do
post majors_path, params: { major: {
- jurusan_1: 'fisika 1', jurusan_2: 'fisika 2', jurusan_3: 'math',
+ jurusan1: 'fisika 1', jurusan2: 'fisika 2', jurusan3: 'math',
gelombang: 'pmdk sumut', user_id: 90_989_098
} }
end
@@ -64,12 +64,12 @@ def setup
get edit_major_path majors(:one)
assert_template 'majors/edit'
patch major_path(majors(:one)), params: { major: {
- jurusan_1: 'fisika 1', jurusan_2: 'fisika 2', jurusan_3: 'math 1',
+ jurusan1: 'fisika 1', jurusan2: 'fisika 2', jurusan3: 'math 1',
gelombang: 'pmdk sumut baru'
} }
- assert_equal 'fisika 1', majors(:one).reload.jurusan_1
- assert_equal 'fisika 2', majors(:one).reload.jurusan_2
- assert_equal 'math 1', majors(:one).reload.jurusan_3
+ assert_equal 'fisika 1', majors(:one).reload.jurusan1
+ assert_equal 'fisika 2', majors(:one).reload.jurusan2
+ assert_equal 'math 1', majors(:one).reload.jurusan3
assert_equal 'pmdk sumut baru', majors(:one).reload.gelombang
end
test 'should reject to update major' do
@@ -80,12 +80,12 @@ def setup
get edit_major_path majors(:one)
assert_template 'majors/edit'
patch major_path(majors(:one)), params: { major: {
- jurusan_1: '1', jurusan_2: '2', jurusan_3: 'math 1',
+ jurusan1: '1', jurusan2: '2', jurusan3: 'math 1',
gelombang: 'pmdk sumut baru'
} }
- assert_nil Major.find_by_jurusan_1 '1'
- assert_nil Major.find_by_jurusan_2 '2'
- assert_nil Major.find_by_jurusan_3 'math 1'
+ assert_nil Major.find_by_jurusan1 '1'
+ assert_nil Major.find_by_jurusan2 '2'
+ assert_nil Major.find_by_jurusan3 'math 1'
end
test 'should reject to update for non permited params' do
get login_path
@@ -95,7 +95,7 @@ def setup
get edit_major_path majors(:one)
assert_template 'majors/edit'
patch major_path(majors(:one)), params: { major: {
- jurusan_1: 'fisika walker', jurusan_2: 'fisika halidaty', jurusan_3: 'math 1',
+ jurusan1: 'fisika walker', jurusan2: 'fisika halidaty', jurusan3: 'math 1',
gelombang: 'pmdk sumut baru', user_id: 19_800_089
} }
assert_nil Major.find_by_user_id 19_800_089
diff --git a/test/integration/parent_test.rb b/test/integration/parent_test.rb
index 9445058..e2b9276 100644
--- a/test/integration/parent_test.rb
+++ b/test/integration/parent_test.rb
@@ -14,9 +14,10 @@ def setup
get new_parent_path
assert_template 'parents/new'
assert_no_difference 'Parent.count' do
- post parents_path, params: { parent: { nama_ayah: 'example', nama_ibu: 'example', nik_ayah: 123, nik_ibu: 1234,
- pendidikan_ayah: 'sma', pendidikan_ibu: 'slta', tanggal_lahir_ayah: '2020-12-11',
- tanggal_lahir_ibu: '2013-12-10', pekerjaan_ayah: 'buruh', pekerjaan_ibu: 'guru' } }
+ post parents_path, params:
+ { parent: { nama_ayah: 'example', nama_ibu: 'example', nik_ayah: 123, nik_ibu: 1234,
+ pendidikan_ayah: 'sma', pendidikan_ibu: 'slta', tanggal_lahir_ayah: '2020-12-11',
+ tanggal_lahir_ibu: '2013-12-10', pekerjaan_ayah: 'buruh', pekerjaan_ibu: 'guru' } }
end
assert_nil Parent.find_by_nik_ayah(123)
assert_nil Parent.find_by_nik_ibu(1234)
@@ -43,7 +44,8 @@ def setup
# try create another parent information? has one relation
assert_no_difference 'Parent.count' do
post parents_path, params: { parent: {
- nama_ayah: 'luhut panjaitan', nama_ibu: 'dinar silaban', nik_ayah: 1_234_567_890_121_345, nik_ibu: 1_234_567_890_123_415,
+ nama_ayah: 'luhut panjaitan', nama_ibu: 'dinar silaban',
+ nik_ayah: 1_234_567_890_121_345, nik_ibu: 1_234_567_890_123_415,
pendidikan_ayah: 'sma', pendidikan_ibu: 'slta', tanggal_lahir_ayah: '2020-12-11',
tanggal_lahir_ibu: '2013-12-10', pekerjaan_ayah: 'buruh', pekerjaan_ibu: 'guru'
} }
@@ -64,7 +66,8 @@ def setup
get edit_parent_path(parents(:myparent))
assert_template 'parents/edit'
patch parent_path(parents(:myparent)), params: { parent: {
- nama_ayah: 'daniel silaban', nama_ibu: 'nisa ritonga', nik_ayah: 1_234_567_890_121_345, nik_ibu: 1_234_567_890_123_415,
+ nama_ayah: 'daniel silaban', nama_ibu: 'nisa ritonga',
+ nik_ayah: 1_234_567_890_121_345, nik_ibu: 1_234_567_890_123_415,
pendidikan_ayah: 'sma', pendidikan_ibu: 'slta', tanggal_lahir_ayah: '2020-12-11',
tanggal_lahir_ibu: '2013-12-10', pekerjaan_ayah: 'Tentara', pekerjaan_ibu: 'guru sd'
} }
diff --git a/test/integration/users_login_test.rb b/test/integration/users_login_test.rb
index 3e3f08f..7d241cf 100644
--- a/test/integration/users_login_test.rb
+++ b/test/integration/users_login_test.rb
@@ -38,10 +38,10 @@ def setup
test 'login followed by logout' do
get login_path
post login_path, params: { session: { email: @user.email, password: 'password' } }
- assert is_logged_in? # check the user is logged in
+ assert logged_in? # check the user is logged in
# logout the user\
delete logout_path
- assert_not is_logged_in? # check the user is logged out
+ assert_not logged_in? # check the user is logged out
assert_redirected_to root_url # check the redirect to the root page
# test logout again in other tab or window
delete logout_path
diff --git a/test/integration/users_signup_test.rb b/test/integration/users_signup_test.rb
index 82d3af2..393e35e 100644
--- a/test/integration/users_signup_test.rb
+++ b/test/integration/users_signup_test.rb
@@ -52,15 +52,15 @@ class UsersSignupTest < ActionDispatch::IntegrationTest
# try login before activation
get login_path
post login_path, params: { session: { email: user.email, password: 'password' } }
- assert_not is_logged_in?
+ assert_not logged_in?
# valid token wrong email
get edit_account_activation_path(user.activation_token, email: 'wrong')
- assert_not is_logged_in?
+ assert_not logged_in?
# valid activation
get edit_account_activation_path(user.activation_token, email: user.email)
assert user.reload.activated?
follow_redirect!
assert_template 'users/show'
- assert is_logged_in?
+ assert logged_in?
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/models/major_test.rb b/test/models/major_test.rb
index 25f36f8..5b48904 100644
--- a/test/models/major_test.rb
+++ b/test/models/major_test.rb
@@ -5,22 +5,22 @@
class MajorTest < ActiveSupport::TestCase
def setup
@user = users(:michael)
- @major = Major.new(user_id: @user.id, jurusan_1: 'example', jurusan_2: 'example1', jurusan_3: 'example3',
+ @major = Major.new(user_id: @user.id, jurusan1: 'example', jurusan2: 'example1', jurusan3: 'example3',
gelombang: 'example')
end
test 'should be valid' do
assert @major.valid?
end
test 'jurusan_1 is required' do
- @major.jurusan_1 = ''
+ @major.jurusan1 = ''
assert_not @major.valid?
end
test 'jurusan_2 is required' do
- @major.jurusan_2 = ''
+ @major.jurusan2 = ''
assert_not @major.valid?
end
test 'jurusan_3 is required' do
- @major.jurusan_3 = ''
+ @major.jurusan3 = ''
assert_not @major.valid?
end
test 'gelombang is required' do
@@ -29,43 +29,43 @@ def setup
end
test "jurusan_1 can't be equal to jurusan_2" do
- @major.jurusan_1 = 'example'
- @major.jurusan_2 = 'example'
+ @major.jurusan1 = 'example'
+ @major.jurusan2 = 'example'
assert_not @major.valid?
end
test "jurusan_1 can't be equal to jurusan_3" do
- @major.jurusan_1 = 'example'
- @major.jurusan_3 = 'example'
+ @major.jurusan1 = 'example'
+ @major.jurusan3 = 'example'
assert_not @major.valid?
end
test "jurusan_2 can't be equal to jurusan_3" do
- @major.jurusan_2 = 'example'
- @major.jurusan_3 = 'example'
+ @major.jurusan2 = 'example'
+ @major.jurusan3 = 'example'
assert_not @major.valid?
end
test 'jurusan_1 should not be to short' do
- @major.jurusan_1 = 'a' * 3
+ @major.jurusan1 = 'a' * 3
assert_not @major.valid?
end
test 'jurusan_1 should not be to long' do
- @major.jurusan_1 = 'a' * 31
+ @major.jurusan1 = 'a' * 31
assert_not @major.valid?
end
test 'jurusan_2 should not be to short' do
- @major.jurusan_2 = 'a' * 3
+ @major.jurusan2 = 'a' * 3
assert_not @major.valid?
end
test 'jurusan_2 should not be to long' do
- @major.jurusan_2 = 'a' * 31
+ @major.jurusan2 = 'a' * 31
assert_not @major.valid?
end
test 'jurusan_3 should not be to short' do
- @major.jurusan_3 = 'a' * 3
+ @major.jurusan3 = 'a' * 3
assert_not @major.valid?
end
test 'jurusan_3 should not be to long' do
- @major.jurusan_3 = 'a' * 31
+ @major.jurusan3 = 'a' * 31
assert_not @major.valid?
end
test 'gelombang should not be to short' do
diff --git a/test/models/personal_test.rb b/test/models/personal_test.rb
index cf6a8a7..a3cdcae 100644
--- a/test/models/personal_test.rb
+++ b/test/models/personal_test.rb
@@ -5,9 +5,10 @@
class PersonalTest < ActiveSupport::TestCase
def setup
@user = users(:michael)
- @personal = Personal.new(user_id: @user.id, nama_lengkap: 'Example User', agama: 'islam', jenis_kelamin: 'laki-laki',
- tempat_lahir: 'jakarta', tanggal_lahir: '1997-12-12',
- nik: 1_234_567_890_123_456, nisn: 1_234_567_890, domisili: 'jakarta')
+ @personal =
+ Personal.new(user_id: @user.id, nama_lengkap: 'Example User', agama: 'islam',
+ jenis_kelamin: 'laki-laki', tempat_lahir: 'jakarta', tanggal_lahir: '1997-12-12',
+ nik: 1_234_567_890_123_456, nisn: 1_234_567_890, domisili: 'jakarta')
end
test 'should be valid' do
assert @personal.valid?
diff --git a/test/models/pmdk_each_score_information_test.rb b/test/models/pmdk_each_score_information_test.rb
index 9216297..048286c 100644
--- a/test/models/pmdk_each_score_information_test.rb
+++ b/test/models/pmdk_each_score_information_test.rb
@@ -6,178 +6,178 @@ class PmdkEachScoreInformationTest < ActiveSupport::TestCase
def setup
@pmdk_each_score =
PmdkEachScoreInformation.new(user_id: users(:michael).id,
- matematika_semester_1: 90, matematika_semester_2: 80,
- matematika_semester_3: 89, matematika_semester_4: 90.8,
- matematika_semester_5: 88.9, kimia_semester_1: 98.9,
- kimia_semester_2: 98.9, kimia_semester_3: 88.7,
- kimia_semester_4: 88.5, kimia_semester_5: 88.1,
- fisika_semester_1: 34.9, fisika_semester_2: 99.9,
- fisika_semester_3: 88.9, fisika_semester_4: 99.7,
- fisika_semester_5: 67.7, bahasa_inggris_semester_1: 88.5,
- bahasa_inggris_semester_2: 56.8, bahasa_inggris_semester_3: 77.2,
- bahasa_inggris_semester_4: 88.1, bahasa_inggris_semester_5: 99)
+ matematika_semester1: 90, matematika_semester2: 80,
+ matematika_semester3: 89, matematika_semester4: 90.8,
+ matematika5: 88.9, kimia1: 98.9,
+ kimia2: 98.9, kimia3: 88.7,
+ kimia4: 88.5, kimia5: 88.1,
+ fisika1: 34.9, fisika2: 99.9,
+ fisika3: 88.9, fisika4: 99.7,
+ fisika5: 67.7, inggris1: 88.5,
+ inggris2: 56.8, inggris3: 77.2,
+ inggris4: 88.1, inggris5: 99)
end
test 'should be valid pmdk each score information' do
assert @pmdk_each_score.valid?
end
- test 'should reject invalid matematika_semester_1 score' do
- @pmdk_each_score.matematika_semester_1 = 1
+ test 'should reject invalid matematika_semester1 score' do
+ @pmdk_each_score.matematika_semester1 = 1
assert_not @pmdk_each_score.valid?
- @pmdk_each_score.matematika_semester_1 = -1
+ @pmdk_each_score.matematika_semester1 = -1
assert_not @pmdk_each_score.valid?
- @pmdk_each_score.matematika_semester_1 = nil
+ @pmdk_each_score.matematika_semester1 = nil
assert_not @pmdk_each_score.valid?
end
test 'should reject invalid matematika_semester_2 score' do
- @pmdk_each_score.matematika_semester_2 = 1
+ @pmdk_each_score.matematika_semester2 = 1
assert_not @pmdk_each_score.valid?
- @pmdk_each_score.matematika_semester_2 = -1
+ @pmdk_each_score.matematika_semester2 = -1
assert_not @pmdk_each_score.valid?
- @pmdk_each_score.matematika_semester_2 = nil
+ @pmdk_each_score.matematika_semester2 = nil
assert_not @pmdk_each_score.valid?
end
test 'should reject invalid matematika_semester_3 score' do
- @pmdk_each_score.matematika_semester_3 = 1
+ @pmdk_each_score.matematika_semester3 = 1
assert_not @pmdk_each_score.valid?
- @pmdk_each_score.matematika_semester_3 = -1
+ @pmdk_each_score.matematika_semester3 = -1
assert_not @pmdk_each_score.valid?
- @pmdk_each_score.matematika_semester_3 = nil
+ @pmdk_each_score.matematika_semester3 = nil
assert_not @pmdk_each_score.valid?
end
test 'should reject invalid matematika_semester_4 score' do
- @pmdk_each_score.matematika_semester_4 = 1
+ @pmdk_each_score.matematika_semester4 = 1
assert_not @pmdk_each_score.valid?
- @pmdk_each_score.matematika_semester_4 = -1
+ @pmdk_each_score.matematika_semester4 = -1
assert_not @pmdk_each_score.valid?
- @pmdk_each_score.matematika_semester_4 = nil
+ @pmdk_each_score.matematika_semester4 = nil
assert_not @pmdk_each_score.valid?
end
test 'should reject invalid matematika_semester_5 score' do
- @pmdk_each_score.matematika_semester_5 = 1
+ @pmdk_each_score.matematika5 = 1
assert_not @pmdk_each_score.valid?
- @pmdk_each_score.matematika_semester_5 = -1
+ @pmdk_each_score.matematika5 = -1
assert_not @pmdk_each_score.valid?
- @pmdk_each_score.matematika_semester_5 = nil
+ @pmdk_each_score.matematika5 = nil
assert_not @pmdk_each_score.valid?
end
test 'should reject invalid fisika_semester_1 score' do
- @pmdk_each_score.fisika_semester_1 = 1
+ @pmdk_each_score.fisika1 = 1
assert_not @pmdk_each_score.valid?
- @pmdk_each_score.fisika_semester_1 = -1
+ @pmdk_each_score.fisika1 = -1
assert_not @pmdk_each_score.valid?
- @pmdk_each_score.fisika_semester_1 = nil
+ @pmdk_each_score.fisika1 = nil
assert_not @pmdk_each_score.valid?
end
test 'should reject invalid fisika_semester_2 score' do
- @pmdk_each_score.fisika_semester_2 = 1
+ @pmdk_each_score.fisika2 = 1
assert_not @pmdk_each_score.valid?
- @pmdk_each_score.fisika_semester_2 = -1
+ @pmdk_each_score.fisika2 = -1
assert_not @pmdk_each_score.valid?
- @pmdk_each_score.fisika_semester_2 = nil
+ @pmdk_each_score.fisika2 = nil
assert_not @pmdk_each_score.valid?
end
test 'should reject invalid fisika_semester_3 score' do
- @pmdk_each_score.fisika_semester_3 = 1
+ @pmdk_each_score.fisika3 = 1
assert_not @pmdk_each_score.valid?
- @pmdk_each_score.fisika_semester_3 = -1
+ @pmdk_each_score.fisika3 = -1
assert_not @pmdk_each_score.valid?
- @pmdk_each_score.fisika_semester_3 = nil
+ @pmdk_each_score.fisika3 = nil
assert_not @pmdk_each_score.valid?
end
test 'should reject invalid fisika_semester_4 score' do
- @pmdk_each_score.fisika_semester_4 = 1
+ @pmdk_each_score.fisika4 = 1
assert_not @pmdk_each_score.valid?
- @pmdk_each_score.fisika_semester_4 = -1
+ @pmdk_each_score.fisika4 = -1
assert_not @pmdk_each_score.valid?
- @pmdk_each_score.fisika_semester_4 = nil
+ @pmdk_each_score.fisika4 = nil
assert_not @pmdk_each_score.valid?
end
test 'should reject invalid fisika_semester_5 score' do
- @pmdk_each_score.fisika_semester_5 = 1
+ @pmdk_each_score.fisika5 = 1
assert_not @pmdk_each_score.valid?
- @pmdk_each_score.fisika_semester_5 = -1
+ @pmdk_each_score.fisika5 = -1
assert_not @pmdk_each_score.valid?
- @pmdk_each_score.fisika_semester_5 = nil
+ @pmdk_each_score.fisika5 = nil
assert_not @pmdk_each_score.valid?
end
test 'should reject invalid kimia_semester_1 score' do
- @pmdk_each_score.kimia_semester_1 = 1
+ @pmdk_each_score.kimia1 = 1
assert_not @pmdk_each_score.valid?
- @pmdk_each_score.kimia_semester_1 = -1
+ @pmdk_each_score.kimia1 = -1
assert_not @pmdk_each_score.valid?
- @pmdk_each_score.kimia_semester_1 = nil
+ @pmdk_each_score.kimia1 = nil
assert_not @pmdk_each_score.valid?
end
test 'should reject invalid kimia_semester_2 score' do
- @pmdk_each_score.kimia_semester_2 = 1
+ @pmdk_each_score.kimia2 = 1
assert_not @pmdk_each_score.valid?
- @pmdk_each_score.kimia_semester_2 = -1
+ @pmdk_each_score.kimia2 = -1
assert_not @pmdk_each_score.valid?
- @pmdk_each_score.kimia_semester_2 = nil
+ @pmdk_each_score.kimia2 = nil
assert_not @pmdk_each_score.valid?
end
test 'should reject invalid kimia_semester_3 score' do
- @pmdk_each_score.kimia_semester_3 = 1
+ @pmdk_each_score.kimia3 = 1
assert_not @pmdk_each_score.valid?
- @pmdk_each_score.kimia_semester_3 = -1
+ @pmdk_each_score.kimia3 = -1
assert_not @pmdk_each_score.valid?
- @pmdk_each_score.kimia_semester_3 = nil
+ @pmdk_each_score.kimia3 = nil
assert_not @pmdk_each_score.valid?
end
test 'should reject invalid kimia_semester_4 score' do
- @pmdk_each_score.kimia_semester_4 = 1
+ @pmdk_each_score.kimia4 = 1
assert_not @pmdk_each_score.valid?
- @pmdk_each_score.kimia_semester_4 = -1
+ @pmdk_each_score.kimia4 = -1
assert_not @pmdk_each_score.valid?
- @pmdk_each_score.kimia_semester_4 = nil
+ @pmdk_each_score.kimia4 = nil
assert_not @pmdk_each_score.valid?
end
test 'should reject invalid kimia_semester_5 score' do
- @pmdk_each_score.kimia_semester_5 = 1
+ @pmdk_each_score.kimia5 = 1
assert_not @pmdk_each_score.valid?
- @pmdk_each_score.kimia_semester_5 = -1
+ @pmdk_each_score.kimia5 = -1
assert_not @pmdk_each_score.valid?
- @pmdk_each_score.kimia_semester_5 = nil
+ @pmdk_each_score.kimia5 = nil
assert_not @pmdk_each_score.valid?
end
test 'should reject invalid bahasa_inggris_sem_1 score' do
- @pmdk_each_score.bahasa_inggris_semester_1 = 1
+ @pmdk_each_score.inggris1 = 1
assert_not @pmdk_each_score.valid?
- @pmdk_each_score.bahasa_inggris_semester_1 = -1
+ @pmdk_each_score.inggris1 = -1
assert_not @pmdk_each_score.valid?
- @pmdk_each_score.bahasa_inggris_semester_1 = nil
+ @pmdk_each_score.inggris1 = nil
assert_not @pmdk_each_score.valid?
end
test 'should reject invalid bahasa_inggris_sem_2 score' do
- @pmdk_each_score.bahasa_inggris_semester_2 = 1
+ @pmdk_each_score.inggris2 = 1
assert_not @pmdk_each_score.valid?
- @pmdk_each_score.bahasa_inggris_semester_2 = -1
+ @pmdk_each_score.inggris2 = -1
assert_not @pmdk_each_score.valid?
- @pmdk_each_score.bahasa_inggris_semester_2 = nil
+ @pmdk_each_score.inggris2 = nil
assert_not @pmdk_each_score.valid?
end
test 'should reject invalid bahasa_inggris_sem_3 score' do
- @pmdk_each_score.bahasa_inggris_semester_3 = 1
+ @pmdk_each_score.inggris3 = 1
assert_not @pmdk_each_score.valid?
- @pmdk_each_score.bahasa_inggris_semester_3 = -1
+ @pmdk_each_score.inggris3 = -1
assert_not @pmdk_each_score.valid?
- @pmdk_each_score.bahasa_inggris_semester_3 = nil
+ @pmdk_each_score.inggris3 = nil
assert_not @pmdk_each_score.valid?
end
test 'should reject invalid bahasa_inggris_sem_4 score' do
- @pmdk_each_score.bahasa_inggris_semester_4 = 1
+ @pmdk_each_score.inggris4 = 1
assert_not @pmdk_each_score.valid?
- @pmdk_each_score.bahasa_inggris_semester_4 = -1
+ @pmdk_each_score.inggris4 = -1
assert_not @pmdk_each_score.valid?
- @pmdk_each_score.bahasa_inggris_semester_4 = nil
+ @pmdk_each_score.inggris4 = nil
assert_not @pmdk_each_score.valid?
end
test 'should reject invalid bahasa_inggris_sem_5 score' do
- @pmdk_each_score.bahasa_inggris_semester_5 = 1
+ @pmdk_each_score.inggris5 = 1
assert_not @pmdk_each_score.valid?
- @pmdk_each_score.bahasa_inggris_semester_5 = -1
+ @pmdk_each_score.inggris5 = -1
assert_not @pmdk_each_score.valid?
- @pmdk_each_score.bahasa_inggris_semester_5 = nil
+ @pmdk_each_score.inggris5 = nil
assert_not @pmdk_each_score.valid?
end
end
diff --git a/test/models/pmdk_total_score_information_test.rb b/test/models/pmdk_total_score_information_test.rb
index e6b8776..94edfd3 100644
--- a/test/models/pmdk_total_score_information_test.rb
+++ b/test/models/pmdk_total_score_information_test.rb
@@ -5,107 +5,107 @@
class PmdkTotalScoreInformationTest < ActiveSupport::TestCase
def setup
@pmdk_total =
- PmdkTotalScoreInformation.new(user_id: users(:michael).id, jumlah_nilai_semester_1: 120.5,
- jumlah_nilai_semester_2: 122.5, jumlah_nilai_semester_3: 130.9,
- jumlah_nilai_semester_4: 189.9, jumlah_nilai_semester_5: 189.98,
- jumlah_pelajaran_semester_1: 3, jumlah_pelajaran_semester_2: 6,
- jumlah_pelajaran_semester_3: 12, jumlah_pelajaran_semester_4: 15,
- jumlah_pelajaran_semester_5: 14)
+ PmdkTotalScoreInformation.new(user_id: users(:michael).id, jumlah_nilai_semester1: 120.5,
+ jumlah_nilai_semester2: 122.5, jumlah_nilai_semester3: 130.9,
+ jumlah_nilai_semester4: 189.9, jumlah_nilai_semester5: 189.98,
+ jumlah_pelajaran_semester1: 3, jumlah_pelajaran_semester2: 6,
+ jumlah_pelajaran_semester3: 12, jumlah_pelajaran_semester4: 15,
+ jumlah_pelajaran_semester5: 14)
end
test 'should be a valid pmdk total score information' do
assert @pmdk_total.valid?
end
test 'should reject invalid jumlah_nilai_semester 1' do
- @pmdk_total.jumlah_nilai_semester_1 = -10
+ @pmdk_total.jumlah_nilai_semester1 = -10
assert_not @pmdk_total.valid?
- @pmdk_total.jumlah_nilai_semester_1 = 0.5
+ @pmdk_total.jumlah_nilai_semester1 = 0.5
assert_not @pmdk_total.valid?
- @pmdk_total.jumlah_nilai_semester_1 = 'abs'
+ @pmdk_total.jumlah_nilai_semester1 = 'abs'
assert_not @pmdk_total.valid?
end
test 'should reject invalid jumlah_nilai_semester 2' do
- @pmdk_total.jumlah_nilai_semester_2 = -10
+ @pmdk_total.jumlah_nilai_semester2 = -10
assert_not @pmdk_total.valid?
- @pmdk_total.jumlah_nilai_semester_2 = 0
+ @pmdk_total.jumlah_nilai_semester2 = 0
assert_not @pmdk_total.valid?
- @pmdk_total.jumlah_nilai_semester_2 = 'abs'
+ @pmdk_total.jumlah_nilai_semester2 = 'abs'
assert_not @pmdk_total.valid?
end
test 'should reject invalid jumlah_nilai_semester 3' do
- @pmdk_total.jumlah_nilai_semester_3 = -10
+ @pmdk_total.jumlah_nilai_semester3 = -10
assert_not @pmdk_total.valid?
- @pmdk_total.jumlah_nilai_semester_3 = 0
+ @pmdk_total.jumlah_nilai_semester3 = 0
assert_not @pmdk_total.valid?
- @pmdk_total.jumlah_nilai_semester_3 = 'abs'
+ @pmdk_total.jumlah_nilai_semester3 = 'abs'
assert_not @pmdk_total.valid?
end
test 'should reject invalid jumlah_nilai_semester 4' do
- @pmdk_total.jumlah_nilai_semester_4 = -10
+ @pmdk_total.jumlah_nilai_semester4 = -10
assert_not @pmdk_total.valid?
- @pmdk_total.jumlah_nilai_semester_4 = 0
+ @pmdk_total.jumlah_nilai_semester4 = 0
assert_not @pmdk_total.valid?
- @pmdk_total.jumlah_nilai_semester_4 = 'abs'
+ @pmdk_total.jumlah_nilai_semester4 = 'abs'
assert_not @pmdk_total.valid?
end
test 'should reject invalid jumlah_nilai_semester 5' do
- @pmdk_total.jumlah_nilai_semester_5 = -10
+ @pmdk_total.jumlah_nilai_semester5 = -10
assert_not @pmdk_total.valid?
- @pmdk_total.jumlah_nilai_semester_5 = 0
+ @pmdk_total.jumlah_nilai_semester5 = 0
assert_not @pmdk_total.valid?
- @pmdk_total.jumlah_nilai_semester_5 = 'abs'
+ @pmdk_total.jumlah_nilai_semester5 = 'abs'
assert_not @pmdk_total.valid?
end
test 'should reject invalid jumlah_matapelajaran_sem 1' do
- @pmdk_total.jumlah_pelajaran_semester_1 = -10
+ @pmdk_total.jumlah_pelajaran_semester1 = -10
assert_not @pmdk_total.valid?
- @pmdk_total.jumlah_pelajaran_semester_1 = 0
+ @pmdk_total.jumlah_pelajaran_semester1 = 0
assert_not @pmdk_total.valid?
- @pmdk_total.jumlah_pelajaran_semester_1 = 'abs'
+ @pmdk_total.jumlah_pelajaran_semester1 = 'abs'
assert_not @pmdk_total.valid?
end
test 'should reject invalid jumlah_matapelajaran_sem 2' do
- @pmdk_total.jumlah_pelajaran_semester_2 = -10
+ @pmdk_total.jumlah_pelajaran_semester2 = -10
assert_not @pmdk_total.valid?
- @pmdk_total.jumlah_pelajaran_semester_2 = 0
+ @pmdk_total.jumlah_pelajaran_semester2 = 0
assert_not @pmdk_total.valid?
- @pmdk_total.jumlah_pelajaran_semester_2 = 'abs'
+ @pmdk_total.jumlah_pelajaran_semester2 = 'abs'
assert_not @pmdk_total.valid?
end
test 'should reject invalid jumlah_matapelajaran_sem 3' do
- @pmdk_total.jumlah_pelajaran_semester_3 = -10
+ @pmdk_total.jumlah_pelajaran_semester3 = -10
assert_not @pmdk_total.valid?
- @pmdk_total.jumlah_pelajaran_semester_3 = 0
+ @pmdk_total.jumlah_pelajaran_semester3 = 0
assert_not @pmdk_total.valid?
- @pmdk_total.jumlah_pelajaran_semester_3 = 'abs'
+ @pmdk_total.jumlah_pelajaran_semester3 = 'abs'
assert_not @pmdk_total.valid?
end
test 'should reject invalid jumlah_matapelajaran_sem 4' do
- @pmdk_total.jumlah_pelajaran_semester_4 = -10
+ @pmdk_total.jumlah_pelajaran_semester4 = -10
assert_not @pmdk_total.valid?
- @pmdk_total.jumlah_pelajaran_semester_4 = 0
+ @pmdk_total.jumlah_pelajaran_semester4 = 0
assert_not @pmdk_total.valid?
- @pmdk_total.jumlah_pelajaran_semester_4 = 'abs'
+ @pmdk_total.jumlah_pelajaran_semester4 = 'abs'
assert_not @pmdk_total.valid?
end
test 'should reject invalid jumlah_matapelajaran_sem 5' do
- @pmdk_total.jumlah_pelajaran_semester_5 = -10
+ @pmdk_total.jumlah_pelajaran_semester5 = -10
assert_not @pmdk_total.valid?
- @pmdk_total.jumlah_pelajaran_semester_5 = 0
+ @pmdk_total.jumlah_pelajaran_semester5 = 0
assert_not @pmdk_total.valid?
- @pmdk_total.jumlah_pelajaran_semester_5 = 'abs'
+ @pmdk_total.jumlah_pelajaran_semester5 = 'abs'
assert_not @pmdk_total.valid?
end
test 'should reject nil value for each pmdk jumlah pelajaran' do
- @pmdk_total.jumlah_pelajaran_semester_1 =
- @pmdk_total.jumlah_pelajaran_semester_2 = @pmdk_total.jumlah_pelajaran_semester_3 =
- @pmdk_total.jumlah_pelajaran_semester_4 = @pmdk_total.jumlah_pelajaran_semester_5 = nil
+ @pmdk_total.jumlah_pelajaran_semester1 =
+ @pmdk_total.jumlah_pelajaran_semester2 = @pmdk_total.jumlah_pelajaran_semester3 =
+ @pmdk_total.jumlah_pelajaran_semester4 = @pmdk_total.jumlah_pelajaran_semester5 = nil
assert_not @pmdk_total.valid?
end
test 'should reject nil value for each pmdk jumlah nilai' do
- @pmdk_total.jumlah_nilai_semester_1 =
- @pmdk_total.jumlah_nilai_semester_2 = @pmdk_total.jumlah_nilai_semester_3 =
- @pmdk_total.jumlah_nilai_semester_4 = @pmdk_total.jumlah_nilai_semester_5 = nil
+ @pmdk_total.jumlah_nilai_semester1 =
+ @pmdk_total.jumlah_nilai_semester2 = @pmdk_total.jumlah_nilai_semester3 =
+ @pmdk_total.jumlah_nilai_semester4 = @pmdk_total.jumlah_nilai_semester5 = nil
assert_not @pmdk_total.valid?
end
end
diff --git a/test/models/usm_school_information_test.rb b/test/models/usm_school_information_test.rb
index 5cf199f..aa203b4 100644
--- a/test/models/usm_school_information_test.rb
+++ b/test/models/usm_school_information_test.rb
@@ -7,7 +7,7 @@ def setup
@usm_school =
UsmSchoolInformation.new(user_id: users(:michael).id, jurusan_sekolah: 'ipa',
asal_sekolah: 'sma santo tomas', akreditas: 'terakreditasi',
- jumlah_pelajaran_semester_5: 8, jumlah_nilai_semester_5: 78.9)
+ jumlah_pelajaran_semester5: 8, jumlah_nilai_semester5: 78.9)
end
test 'should be a valid utbk information' do
assert @usm_school.valid?
@@ -39,15 +39,15 @@ def setup
assert_not @usm_school.valid?
end
test 'should reject for invalid jumlah pelajaran semester 5-usm' do
- @usm_school.jumlah_pelajaran_semester_5 = 21
+ @usm_school.jumlah_pelajaran_semester5 = 21
assert_not @usm_school.valid?
- @usm_school.jumlah_pelajaran_semester_5 = -1
+ @usm_school.jumlah_pelajaran_semester5 = -1
assert_not @usm_school.valid?
end
test 'should reject for invalid jumlah nilai semester 5-usm' do
- @usm_school.jumlah_nilai_semester_5 = -30.9
+ @usm_school.jumlah_nilai_semester5 = -30.9
assert_not @usm_school.valid?
- @usm_school.jumlah_nilai_semester_5 = 2001
+ @usm_school.jumlah_nilai_semester5 = 2001
assert_not @usm_school.valid?
end
test 'should allow non mandatory attribute to be empty-usm' do
diff --git a/test/models/utbk_score_test.rb b/test/models/utbk_score_test.rb
index 1210ea8..660d8ce 100644
--- a/test/models/utbk_score_test.rb
+++ b/test/models/utbk_score_test.rb
@@ -5,7 +5,7 @@
class UtbkScoreTest < ActiveSupport::TestCase
def setup
@score_utbk = UtbkScore.new(user_id: users(:michael).id, no_peserta: '200-1bx', tanggal_ujian: '2020-12-11',
- jumlah_nilai_semester_6: 1200.5, jumlah_pelajaran_semester_6: 11,
+ jumlah_nilai_semester6: 1200.5, jumlah_pelajaran_semester6: 11,
nilai_penalaran_umum: 120.5,
nilai_pengetahuan_kuantitatif: 150.5,
nilai_kemampuan_memahami_bacaan_dan_menulis: 300.5,
@@ -31,19 +31,19 @@ def setup
assert_not @score_utbk.valid?
end
test 'should reject invalid jumlah_nilai_semester_6' do
- @score_utbk.jumlah_nilai_semester_6 = -12
+ @score_utbk.jumlah_nilai_semester6 = -12
assert_not @score_utbk.valid?
- @score_utbk.jumlah_nilai_semester_6 = 3000
+ @score_utbk.jumlah_nilai_semester6 = 3000
assert_not @score_utbk.valid?
- @score_utbk.jumlah_nilai_semester_6 = 'abs'
+ @score_utbk.jumlah_nilai_semester6 = 'abs'
assert_not @score_utbk.valid?
end
test 'should reject for invalid jumlah pelajaran semester 6' do
- @score_utbk.jumlah_pelajaran_semester_6 = -1
+ @score_utbk.jumlah_pelajaran_semester6 = -1
assert_not @score_utbk.valid?
- @score_utbk.jumlah_pelajaran_semester_6 = 101
+ @score_utbk.jumlah_pelajaran_semester6 = 101
assert_not @score_utbk.valid?
- @score_utbk.jumlah_pelajaran_semester_6 = 'abs'
+ @score_utbk.jumlah_pelajaran_semester6 = 'abs'
assert_not @score_utbk.valid?
end
test 'should reject for invalid nilai_penalaran_umum ' do
@@ -86,7 +86,7 @@ def setup
assert_equal 179.5, utbk_scores(:utbk_score_one).reload.nilai_penalaran_umum
end
test 'should reject jumlah matapelajaran un for non integer' do
- @score_utbk.jumlah_pelajaran_semester_6 = 90.98
+ @score_utbk.jumlah_pelajaran_semester6 = 90.98
assert_not @score_utbk.valid?
end
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
diff --git a/test/test_helper.rb b/test/test_helper.rb
index 399a6d2..b44ea12 100644
--- a/test/test_helper.rb
+++ b/test/test_helper.rb
@@ -17,7 +17,7 @@ class TestCase
# Add more helper methods to be used by all tests here...
# is_logged_in? : return true if a test user is logged in
- def is_logged_in?
+ def logged_in?
!session[:user_id].nil? # check if the session is not nil
end