application.rb
来自「本书源码对于学习RUBY网络编程语言非常有帮助。」· RB 代码 · 共 23 行
RB
23 行
# Filters added to this controller will be run for all controllers in the application.# Likewise, all the methods added will be available for all controllers.class ApplicationController < ActionController::Base layout("base") before_filter :get_customer def get_customer if @session['customer'] @c = Customer.find(@session['customer']) end end private def report_error(message) @message = message render("main/error") return false endend
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?