summaryrefslogtreecommitdiff
path: root/certs/app/controllers/certs_controller.rb
blob: 3ec2f689154382e45787222a2dc606272ceb430e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
class CertsController < ApplicationController

  before_filter :authorize

  # GET /cert
  def show
    @cert = ClientCertificate.create
    render :text => @cert.key + @cert.cert, :content_type => 'text/plain'
  rescue RECORD_NOT_FOUND
    flash[:error] = t(:cert_pool_empty)
    redirect_to root_path
  end

end