Skip to content

Commit 558f24b

Browse files
committed
Update slug format for protips model
1 parent 4090834 commit 558f24b

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

app/models/protip.rb

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -954,7 +954,11 @@ def matching_jobs
954954
def to_html
955955
CFM::Markdown.render self.body
956956
end
957-
957+
958+
def slug_format
959+
"#{public_id}-#{title}"
960+
end
961+
958962
protected
959963
def check_links
960964
errors[:body] << "one or more of the links are invalid or not publicly reachable/require login" unless valid_links?
@@ -973,9 +977,6 @@ def analyze_spam
973977
AnalyzeSpamJob.perform_async({ id: id, klass: self.class.name })
974978
end
975979

976-
def slug_format
977-
"#{public_id}-#{title}"
978-
end
979980
end
980981

981982
# == Schema Information

0 commit comments

Comments
 (0)