diff options
Diffstat (limited to 'app/controllers/snapshots_controller.rb')
| -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 |
