📄 test_controller.rb
字号:
class TestController < ApplicationController
def one
cookies[:name] = "Squirrel"
render(:text => cookies[:name].to_s)
end
def two
cookies[:current_time] = Time.now.to_s
redirect_to(:action => "three")
end
def three
render(:text => cookies[:current_time].to_s)
end
def four
cookies[:test_cookies] = {:value => "four",
:expires => 10.days.from_now}
end
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -