Skip to content

Commit

Permalink
Specify case-sensitive uniqueness for page part slug (Rails 6 depreca…
Browse files Browse the repository at this point in the history
…tion warning)
  • Loading branch information
n7st authored and parndt committed Apr 23, 2023
1 parent f996a58 commit 4930062
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pages/app/models/refinery/page_part.rb
Expand Up @@ -6,7 +6,7 @@ class PagePart < Refinery::Core::BaseModel
before_validation :set_default_slug

validates :title, :presence => true
validates :slug, :presence => true, :uniqueness => {:scope => :refinery_page_id}
validates :slug, :presence => true, :uniqueness => {:scope => :refinery_page_id, :case_sensitive => true}
alias_attribute :content, :body

extend Mobility
Expand Down

0 comments on commit 4930062

Please sign in to comment.