Skip to content

Commit

Permalink
Merge pull request #2078 from tvdeyen/faster-url-path
Browse files Browse the repository at this point in the history
Use count over select.count in UrlPath class
  • Loading branch information
tvdeyen authored Apr 22, 2021
2 parents f17fc1e + 96b8858 commit ff836ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/alchemy/page/url_path.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def initialize(page)
def call
if @page.language_root?
language_root_path
elsif @site.languages.select(&:public?).length > 1
elsif @site.languages.count(&:public?) > 1
page_path_with_language_prefix
else
page_path_with_leading_slash
Expand Down

0 comments on commit ff836ad

Please sign in to comment.