Skip to content

Commit

Permalink
Use positional arguments for defining enums
Browse files Browse the repository at this point in the history
Rails 8.0 removes the option to remove keyword
arguments for defingin enums.
  • Loading branch information
tvdeyen committed Oct 31, 2024
1 parent aab4eea commit f761108
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/app/models/spree/tax_rate.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class TaxRate < Spree::Base
include Spree::CalculatedAdjustments
include Spree::AdjustmentSource

enum level: {
enum :level, {
item: 0,
order: 1
}, _suffix: true
Expand Down
2 changes: 1 addition & 1 deletion promotions/app/models/solidus_promotions/promotion.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class Promotion < Spree::Base
joins(:benefits).distinct
end

enum lane: SolidusPromotions.config.preferred_lanes
enum :lane, SolidusPromotions.config.preferred_lanes

def self.with_coupon_code(val)
joins(:codes).where(
Expand Down

0 comments on commit f761108

Please sign in to comment.