You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# This block checks if any of the fields have changed
183
186
# Broken into different branches for specific fields
184
187
# If no fields are changed it will not set @changed or session[:changed] to true
185
188
@edit[:new].each_keydo |key|
186
189
if@edit[:new][key] != @edit[:current][key]
187
-
if@edit[:new][key] == ""&& @edit[:current][key].nil?# check empty string / nil case
190
+
if@edit[:new][key].blank?&& @edit[:current][key].blank?# check empty string / nil case
188
191
next
189
192
elsif@edit[:new][key] == @edit[:current][key].to_s# check string / integer case
190
193
next
191
194
elsifkey == :roles# check role values
192
195
if(@edit[:new][key] == ["_ALL_"] || @edit[:new][key] == []) && (@edit[:current][key].nil? || @edit[:current][key] == ["all"] || @edit[:current][key] == ["_ALL_"])# if visibility is set to "To All"
193
196
next
194
-
elsif@edit[:new][key].sort == @edit[:current][key].sort# check if new roles array and current roles array are equal after sorting the ids
197
+
elsif@edit[:new][key].collect(&:to_i).sort == @edit[:current][key].collect(&:to_i).sort# check if new roles array and current roles array are equal after sorting the ids
195
198
next
196
199
else# if new roles array and current roles array are not equal
0 commit comments