blob: e453b4965b6c3f2bc5858461ec0bf5c9d6f4a01e (
plain)
| 1
2
3
4
5
6
7
8
9
10
11
12
13
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
 |