rails 5: more various fixes
refs CNVS-34862 Change-Id: Ic49eae5da1e5e5f1425cb5ca8655b2cd8e29ae66 Reviewed-on: https://gerrit.instructure.com/102607 Tested-by: Jenkins Reviewed-by: Simon Williams <simon@instructure.com> Product-Review: Cody Cutrer <cody@instructure.com> QA-Review: Cody Cutrer <cody@instructure.com>
This commit is contained in:
parent
d49ff21ea7
commit
6bcc5ddbbd
|
@ -32,7 +32,7 @@ gem 'folio-pagination', '0.0.11', require: 'folio/rails'
|
|||
# for folio, see the folio README
|
||||
gem 'will_paginate', '3.1.5', require: false
|
||||
|
||||
gem "after_transaction_commit", '1.1.0'
|
||||
gem "after_transaction_commit", '1.1.1'
|
||||
gem "aws-sdk", '2.6.7', require: false
|
||||
gem 'barby', '0.6.5', require: false
|
||||
gem 'rqrcode', '0.10.1', require: false
|
||||
|
|
|
@ -30,7 +30,7 @@ group :test do
|
|||
gem 'rainbow', '2.2.1', require: false
|
||||
gem 'rubocop-rspec', '1.10.0', require: false
|
||||
|
||||
gem 'once-ler', '0.1.0'
|
||||
gem 'once-ler', '0.1.1'
|
||||
|
||||
# Keep this gem synced with docker-compose/seleniumff/Dockerfile
|
||||
gem 'selenium-webdriver', '2.53.4'
|
||||
|
|
|
@ -25,7 +25,11 @@ class AppointmentGroup < ActiveRecord::Base
|
|||
# has_many :through on the same table does not alias columns in condition
|
||||
# strings, just hashes. we create this helper association to ensure
|
||||
# appointments_participants conditions have the correct table alias
|
||||
has_many :_appointments, -> { order(:start_at).preload(:child_events).where("_appointments_appointments_participants_join.workflow_state <> 'deleted'") }, opts
|
||||
if CANVAS_RAILS4_2
|
||||
has_many :_appointments, -> { order(:start_at).preload(:child_events).where("_appointments_appointments_participants_join.workflow_state <> 'deleted'") }, opts
|
||||
else
|
||||
has_many :_appointments, -> { order(:start_at).preload(:child_events).where("_appointments_appointments_participants.workflow_state <> 'deleted'") }, opts
|
||||
end
|
||||
has_many :appointments_participants, -> { where("calendar_events.workflow_state <> 'deleted'").order(:start_at) }, through: :_appointments, source: :child_events
|
||||
has_many :appointment_group_contexts
|
||||
has_many :appointment_group_sub_contexts, -> { preload(:sub_context) }
|
||||
|
|
|
@ -105,7 +105,7 @@ class Notification < ActiveRecord::Base
|
|||
to_list.each do |to|
|
||||
msgs = NotificationMessageCreator.new(self, asset, options.merge(:to_list => to)).create_message
|
||||
messages.concat msgs if Rails.env.test?
|
||||
to.clear_association_cache if to.is_a?(User)
|
||||
to.send(:clear_association_cache) if to.is_a?(User)
|
||||
end
|
||||
messages
|
||||
end
|
||||
|
|
|
@ -923,7 +923,7 @@ module UpdateAndDeleteWithJoins
|
|||
stmt = CANVAS_RAILS4_2 ? Arel::UpdateManager.new(arel.engine) : Arel::UpdateManager.new
|
||||
|
||||
stmt.set Arel.sql(@klass.send(:sanitize_sql_for_assignment, updates))
|
||||
from = (CANVAS_RAILS4_2 ? from_value : from_clause).try(:first)
|
||||
from = (CANVAS_RAILS4_2 ? from_value&.first : from_clause.value)
|
||||
stmt.table(from ? Arel::Nodes::SqlLiteral.new(from) : table)
|
||||
stmt.key = table[primary_key]
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ class EffectiveDueDates
|
|||
attributes[:grading_period_id] = row["grading_period_id"] && row["grading_period_id"].to_i
|
||||
end
|
||||
if include?(included, :in_closed_grading_period)
|
||||
attributes[:in_closed_grading_period] = row["closed"] == "t"
|
||||
attributes[:in_closed_grading_period] = (CANVAS_RAILS4_2 ? (row["closed"] == "t") : row["closed"])
|
||||
end
|
||||
if include?(included, :override_id)
|
||||
attributes[:override_id] = row["override_id"] && row["override_id"].to_i
|
||||
|
|
Loading…
Reference in New Issue