Skip to content

Commit

Permalink
Merge pull request #20029 from jrafanie/pass_strings_to_where_classes…
Browse files Browse the repository at this point in the history
…_not_class_objects

With rails 5.2, where clauses will no longer cast Class objects as Strings

(cherry picked from commit 346956c)
  • Loading branch information
kbrock authored and simaishi committed Apr 3, 2020
1 parent dc66de3 commit 9912863
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/miq_report_result.rb
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ def self.with_current_user_groups
end

def self.with_chargeback
includes(:miq_report).where(:miq_reports => {:db => Chargeback.subclasses})
includes(:miq_report).where(:miq_reports => {:db => Chargeback.subclasses.collect(&:name)})
end

def self.with_saved_chargeback_reports(report_id = nil)
Expand Down

0 comments on commit 9912863

Please sign in to comment.