git add 前,要记得先看一下 git status ,不需要 commit 的就不要加入。

git commit 之前,要确认一下 .gitignore ,以免把 test 或是 database 的资料也丢上去了。

工作平台上的 rails 指令,要记得加上 RAILS_ENV=production 。

太多判断式的 code ,就丢到 helper 里面包起来,程式也会比较易读。

helper 里面的 method ,一定要写 return ,避免呼叫后不晓得是哪段程式 return 结果。

相关文章