随着model的扩大,肯定需要用namespace来对model进行分类管理,无论是出于对文件夹的优化管理,还是将来对系统的重构、拆解。
例如,对于班级布置和学生布置,就统一放到了assignment这个namespace中,这样,在i18n时,就需要注意,namespace与model之间不是用层级,而是用'/'来分开:
assignment/klass_assignment: date_range: 有效期
而不是
随着model的扩大,肯定需要用namespace来对model进行分类管理,无论是出于对文件夹的优化管理,还是将来对系统的重构、拆解。
例如,对于班级布置和学生布置,就统一放到了assignment这个namespace中,这样,在i18n时,就需要注意,namespace与model之间不是用层级,而是用'/'来分开:
assignment/klass_assignment: date_range: 有效期
而不是
若需要执行定时/定期任务,需要添加 resque-scheduler
require 'resque/server' require 'resque_scheduler/server' class ActionDispatch::Routing::Mapper
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Ansi 0 Color</key> | |
<dict> | |
<key>Blue Component</key> | |
<real>0.52941176470588236</real> | |
<key>Green Component</key> | |
<real>0.52941176470588236</real> |
[user] | |
name = creeek | |
email = [email protected] | |
[color] | |
status = auto | |
branch = auto | |
diff = auto | |
ui = true | |
pager = true | |
[color "branch"] |
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function* | |
## | |
# Your previous /Users/user/.bash_login file was backed up as /Users/user/.bash_login.macports-saved_2012-04-19_at_19:56:02 | |
## | |
# MacPorts Installer addition on 2012-04-19_at_19:56:02: adding an appropriate PATH variable for use with MacPorts. | |
export PATH=/opt/local/bin:/opt/local/sbin:$PATH | |
# Finished adapting your PATH environment variable for use with MacPorts. |
" .vimrc | |
" Author: Steve Losh <[email protected]> | |
" Source: http://bitbucket.org/sjl/dotfiles/src/tip/vim/ | |
" | |
" This file changes a lot. I'll try to document pieces of it whenever I have | |
" a few minutes to kill. | |
" Preamble ---------------------------------------------------------------- {{{ | |
" Dear /bin/bash: fuck you and your bullshit, arcane command-line behaviour. |
'exception-reporting': | |
'userId': 'xxxxxxxx' | |
'welcome': | |
'showOnStartup': false | |
'metrics': | |
'userId': 'xxxxxxxx' | |
'editor': | |
'fontSize': 16 | |
'fontFamily': 'YaHei Consolas Hybrid' | |
'preferredLineLength': 80 |
<math xmlns="http://www.w3.org/1998/Math/MathML"> | |
<mi>a</mi><mo>=</mo><msup><mn>5</mn><mrow><msub><mi>log</mi><mn>2</mn></msub><mn>3</mn><mo>.</mo><mn>4</mn></mrow></msup> | |
</math> |
{ | |
"auto_complete_commit_on_tab": true, | |
"bold_folder_labels": true, | |
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme", | |
"draw_minimap_border": false, | |
"ensure_newline_at_eof_on_save": true, | |
"file_exclude_patterns": | |
[ | |
".DS_Store", | |
".tags*", |