diff options
| author | Teddy Wing | 2018-01-25 12:05:23 +0100 | 
|---|---|---|
| committer | Zog | 2018-01-25 17:18:02 +0100 | 
| commit | e926c05033bef396b69fca05db75847707bbf6f0 (patch) | |
| tree | 13a72f1b3e9d209e4610c38082bd8c4babfb3d45 | |
| parent | a636969d6e588f0fb7d155bbc22582f742da8e48 (diff) | |
| download | chouette-core-e926c05033bef396b69fca05db75847707bbf6f0.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.rb | 1 | 
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 | 
