Skip to content

Commit

Permalink
Update navigation_item.rb
Browse files Browse the repository at this point in the history
support for older Rails version added
  • Loading branch information
webhoernchen authored Oct 18, 2024
1 parent b6dbbef commit 6b157f8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/models/spina/navigation_item.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ class NavigationItem < ApplicationRecord
# NavigationItems can be of two different kinds:
# - A link to a page
# - A link to a URL
enum :kind, {page: "page", url: "url"}, suffix: true
if Rails.version >= '7.2'
enum :kind, {page: "page", url: "url"}, suffix: true
else
enum kind: {page: "page", url: "url"}, _suffix: true
end

has_ancestry

Expand Down

0 comments on commit 6b157f8

Please sign in to comment.