diff options
| author | Luc Donnet | 2018-02-09 15:04:58 +0100 |
|---|---|---|
| committer | Luc Donnet | 2018-02-09 15:04:58 +0100 |
| commit | 7b62e86c4d5cc878fd9178d2296c3f5498bcd1cb (patch) | |
| tree | e97abcf575f059463fda54f15dba045f08467402 /app/controllers | |
| parent | 8147a3bd838aaaa959c3f488c1bc9016a5401645 (diff) | |
| parent | a68053c85fdb55e43fdf1ae7d9aba95e31a148bb (diff) | |
| download | chouette-core-7b62e86c4d5cc878fd9178d2296c3f5498bcd1cb.tar.bz2 | |
Merge branch 'master' into 4126-add-i18n-js
Diffstat (limited to 'app/controllers')
| -rw-r--r-- | app/controllers/snapshots_controller.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/app/controllers/snapshots_controller.rb b/app/controllers/snapshots_controller.rb new file mode 100644 index 000000000..e453b4965 --- /dev/null +++ b/app/controllers/snapshots_controller.rb @@ -0,0 +1,14 @@ +class SnapshotsController < ApplicationController + if Rails.env.development? || Rails.env.test? + layout :which_layout + def show + tpl = params[:snap] + tpl = tpl.gsub Rails.root.to_s, '' + render file: tpl + end + + def which_layout + "snapshots/#{params[:layout] || "default"}" + end + end +end |
