Skip to content

Commit 4fdf1f5

Browse files
committed
Update application_helper.rb
1 parent 695be7e commit 4fdf1f5

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

app/helpers/application_helper.rb

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
11
module ApplicationHelper
22
def canonical_url(opts = {})
3+
# Clean-up options
4+
opts_parse = {}
5+
opts.keys.map(&:to_s).sort.each do |k_s|
6+
k = k_s.to_sym
7+
next if k_s == 'page' and opts[k] == 1
8+
opts_parse[k] = opts[k]
9+
end
10+
311
url_for({
412
only_path: false, protocol: 'https', host: 'registry.seqco.de'
5-
}.merge(opts))
13+
}.merge(opts_parse))
614
end
715

816
def report_history(obj, text: 'Report history')

0 commit comments

Comments
 (0)