Skip to content

Commit

Permalink
bump store_attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
ulferts committed Jan 6, 2025
1 parent f53a966 commit 9fae5e6
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ gem "dry-monads"
gem "dry-validation"

# ActiveRecord extension which adds typecasting to store accessors
gem "store_attribute", "~> 1.0"
gem "store_attribute", "~> 2.0"

# Appsignal integration
gem "appsignal", "~> 3.10.0", require: false
Expand Down
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1107,7 +1107,7 @@ GEM
sprockets (>= 3.0.0)
ssrf_filter (1.0.8)
stackprof (0.2.26)
store_attribute (1.3.1)
store_attribute (2.0.0)
activerecord (>= 6.1)
stringex (2.8.6)
stringio (3.1.2)
Expand Down Expand Up @@ -1392,7 +1392,7 @@ DEPENDENCIES
sprockets (~> 3.7.2)
sprockets-rails (~> 3.5.1)
stackprof
store_attribute (~> 1.0)
store_attribute (~> 2.0)
stringex (~> 2.8.5)
structured_warnings (~> 0.4.0)
svg-graph (~> 2.2.0)
Expand Down
34 changes: 34 additions & 0 deletions config/initializers/store_attribute.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# frozen_string_literal: true

# -- copyright
# OpenProject is an open source project management software.
# Copyright (C) 2025 the OpenProject GmbH
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License version 3.
#
# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2010-2013 the ChiliProject Team
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# See COPYRIGHT and LICENSE files for more details.
# ++

# From v1.0 to v2.0 of store_attribute, the value for store_attribute_unset_values_fallback_to_default changed from
# false to true. This initializer sets it back to false to keep the behavior consistent with the previous version.

StoreAttribute.store_attribute_unset_values_fallback_to_default = false

0 comments on commit 9fae5e6

Please sign in to comment.