Browse Source

Rubocop fixes

pull/56/head
baarkerlounger 3 years ago
parent
commit
1fce70bd3c
  1. 2
      app/controllers/case_logs_controller.rb
  2. 9
      db/migrate/20211015090040_update_property_number_of_times_relet_type.rb

2
app/controllers/case_logs_controller.rb

@ -35,7 +35,7 @@ class CaseLogsController < ApplicationController
def show def show
respond_to do |format| respond_to do |format|
# We don't have a dedicated non-editable show view # We don't have a dedicated non-editable show view
format.html { edit } format.html { edit }
format.json do format.json do
if (case_log = CaseLog.find_by(id: params[:id])) if (case_log = CaseLog.find_by(id: params[:id]))

9
db/migrate/20211015090040_update_property_number_of_times_relet_type.rb

@ -1,6 +1,9 @@
class UpdatePropertyNumberOfTimesReletType < ActiveRecord::Migration[6.1] class UpdatePropertyNumberOfTimesReletType < ActiveRecord::Migration[6.1]
def change def up
remove_column :case_logs, :property_number_of_times_relet, :string change_column :case_logs, :property_number_of_times_relet, "integer USING CAST(property_number_of_times_relet AS integer)"
add_column :case_logs, :property_number_of_times_relet, :integer end
def down
change_column :case_logs, :property_number_of_times_relet, :string
end end
end end

Loading…
Cancel
Save