diff options
author | Marius Balteanu <marius.balteanu@zitec.com> | 2023-11-27 20:58:55 +0000 |
---|---|---|
committer | Marius Balteanu <marius.balteanu@zitec.com> | 2023-11-27 20:58:55 +0000 |
commit | 7b911245d31509da8fa656bbedc37213d3148897 (patch) | |
tree | e3c7dd7cb0bd2438a895474056cfadbb4ac3262a /app/models/query.rb | |
parent | 859bc07edb1f74ab348ff3c54b9af48e714575a2 (diff) | |
download | redmine-7b911245d31509da8fa656bbedc37213d3148897.tar.gz redmine-7b911245d31509da8fa656bbedc37213d3148897.zip |
Updates Rails to 7.1.2 (#36320).
Patch by Takashi Kato.
git-svn-id: https://svn.redmine.org/redmine/trunk@22488 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/query.rb')
-rw-r--r-- | app/models/query.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/models/query.rb b/app/models/query.rb index 5630f95c7..3208dc535 100644 --- a/app/models/query.rb +++ b/app/models/query.rb @@ -257,8 +257,8 @@ class Query < ActiveRecord::Base has_and_belongs_to_many :roles, :join_table => "#{table_name_prefix}queries_roles#{table_name_suffix}", :foreign_key => "query_id" serialize :filters serialize :column_names - serialize :sort_criteria, Array - serialize :options, Hash + serialize :sort_criteria, type: Array + serialize :options, type: Hash validates_presence_of :name validates_length_of :name, :maximum => 255 @@ -1631,7 +1631,7 @@ class Query < ActiveRecord::Base else from = from - 1 # second end - if self.class.default_timezone == :utc + if ActiveRecord.default_timezone == :utc from = from.utc end s << ("#{table}.#{field} > '%s'" % [quoted_time(from, is_custom_filter)]) @@ -1640,7 +1640,7 @@ class Query < ActiveRecord::Base if to.is_a?(Date) to = date_for_user_time_zone(to.year, to.month, to.day).end_of_day end - if self.class.default_timezone == :utc + if ActiveRecord.default_timezone == :utc to = to.utc end s << ("#{table}.#{field} <= '%s'" % [quoted_time(to, is_custom_filter)]) |