aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2018-01-25 12:05:23 +0100
committerTeddy Wing2018-01-25 12:05:23 +0100
commitc44aa17da0c08fcfff11eaa1ff03f6cab6bd0eb0 (patch)
tree8238d1aa6c91bd387bc9bd5abaed8ce2b37ec32a
parentf6bd1e9ae866da9c2d38c5429738558795bb2b85 (diff)
downloadchouette-core-c44aa17da0c08fcfff11eaa1ff03f6cab6bd0eb0.tar.bz2
AF83::Decorator::Link: Add `data-method` to HTML options
Previously, we weren't correctly adding the HTTP method to the links in the header. This is because it's called `link_method` in the class. Put this value in `method`/`data-method` when converting the link to HTML so that the links work properly. Discovered this when deactivating and activating stop areas on http://stif-boiv.dev:3000/stop_area_referentials/1/stop_areas/139429 . Refs #5586
-rw-r--r--lib/af83/decorator/link.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/af83/decorator/link.rb b/lib/af83/decorator/link.rb
index 55db3f5bb..7d2896e6a 100644
--- a/lib/af83/decorator/link.rb
+++ b/lib/af83/decorator/link.rb
@@ -126,6 +126,7 @@ class AF83::Decorator::Link
options.each do |k, v|
out[k] = self.send(k) unless k == :content || k == :href || k.to_s =~ /^_/
end
+ out[:method] = link_method
out[:class] = extra_class
out.delete(:link_class)
out[:class] += " disabled" if disabled