Skip to content

Commit e1b4d1f

Browse files
committed
Update protip slug to use -- as a separator
1 parent 68389fd commit e1b4d1f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/controllers/protips_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ def expand_query(query_string)
404404
end
405405

406406
def lookup_protip
407-
@protip = if public_id = params[:id].split('-').first
407+
@protip = if public_id = params[:id].split('--').first
408408
Protip.find_by_public_id(public_id.downcase)
409409
else
410410
nil

app/models/protip.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -956,7 +956,7 @@ def to_html
956956
end
957957

958958
def slug_format
959-
"#{public_id}-#{title}"
959+
"#{public_id}--#{title}"
960960
end
961961

962962
protected

0 commit comments

Comments
 (0)