File: simple_controller.rb

package info (click to toggle)
thin 1.3.1-3
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 1,084 kB
  • sloc: ruby: 4,138; ansic: 1,537; sh: 82; makefile: 8
file content (19 lines) | stat: -rw-r--r-- 334 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
class SimpleController < ApplicationController
  caches_page :cached
  
  def index
  end
  
  def post_form
    render :text => params.to_yaml
  end
  
  def set_cookie
    cookies[params[:name]] = params[:value] if params[:name]
    render :text => cookies.to_yaml
  end
  
  def cached
    render :text => params[:value]
  end
end