lib/scrivito/cms_routing.rb in scrivito_sdk-0.70.2 vs lib/scrivito/cms_routing.rb in scrivito_sdk-0.71.0.rc1
- old
+ new
@@ -96,10 +96,16 @@
"cms_legacy_id_#{path_or_url}"
else
"cms_id_#{path_or_url}"
end
- main_app.public_send(method_name, options.merge(id: obj.id))
+ options[:id] = obj.id
+
+ # Options must have the key slug.
+ # Otherwise Rails will use the slug from current request params.
+ options[:slug] ||= nil
+
+ main_app.public_send(method_name, options)
end
def homepage?(obj)
RequestHomepage.call(request.env) == obj
end