Skip to content

Commit

Permalink
Merge pull request #834 from scott/fix/832-kb-i18n-error
Browse files Browse the repository at this point in the history
Fix/832 kb i18n error
  • Loading branch information
scott committed Jun 29, 2018
2 parents 59c142c + 8524255 commit d0a1683
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/models/doc.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ class Doc < ActiveRecord::Base
scope :publicly, -> { joins(:category).where(categories: { visibility: %w[all public] }) }

def to_param
return "#{id}-missing-title" if title.nil?
"#{id}-#{title.parameterize}"
end

Expand Down

0 comments on commit d0a1683

Please sign in to comment.