#3 楼 @cassiuschen 一段时间没看 less 了,可能有出入。therubyracer 是 js runtime,要编译 less 总需要 less 库吧。
Sass。在 Rails 引入 Less 库要依赖 less-rails,它打包了一个 js 库,这样就多了一个依赖,而且我记得这个 gem 不太完善。
rvm 现在自动装包了。
我又看了一遍
需要给页面一个属性 type。
这不是页面的一个字段吗?
type 太多含义了,看完还是没了解场景。一般来说:
#25 楼 @chechaoyang 有人会觉得自己已经处理过了所以安全了,我总是为所有需要输出 HTML 的内容加 sanitize,除非是 SiteConfig 这种只有管理员输入、可能带有 javascript 的内容。
昨天试了一下 Persona,发现不友好的地方:
整个登陆流程会让人困惑,所以我还是选择用 bcrypt 加密自己写登陆逻辑。
用 Mozilla Persona http://chloerei.com/2013/12/06/mozilla-persona/
先 evert.preventDefault()
然后在动画的 callback $form.submit()
看看。
没看明白,这是楼主自己写的教程然后通过 QQ 群分发吗?
#9 楼 @tyaccp_guojian 多谢,已部署。
#15 楼 @RainFlying .bashrc 里面没写有读 .profile 的规则。Ubuntu 的 man bash 写有:
When bash is invoked as an interactive login shell, or as a non-interactive shell with the --login option, it first reads and executes commands from the file /etc/profile, if that file exists. After reading that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile, in that order, and reads and executes commands from the first one that exists and is readable.
#13 楼 @RainFlying 我把 .bash_profile 删除,在 .profile 里面加一句 echo '.profile'
,然后开新的终端,有显示出 .profile
。然后把 .bash_profile 恢复,开新的终端,就不显示 .profile
了。
有的系统默认有一个 .profile,然后 rvm 生成了 .bash_profile,然后有的 login shell 在有 .bash_profile 的情况下就不会读取 .profile 了,所以提醒你要在 .bash_profile 里面 source .profile,但是如果你在 .profile 里面没有什么内容就不用管了。
#3 楼 @crazyjin 我指 Class 后面跟一个 block。
#4 楼 @crazyjin 我查了一下不支持直接根据 $size 排序的,除非用 Aggregation 等查询时运算的方法,不知你觉得这个开销值不值得了。
http://stackoverflow.com/questions/9040161/mongo-order-by-length-of-array
正题:加个 books_count 字段。
Person {
include Mongoid:Document
has_many :books
}
这是什么表示法……
对项目要用的数据库越熟练越好,只懂 ActiveRecord 不行。
Auguri Buon Anno~!
什么系统?很大可能是这个 https://rvm.io/integration/gnome-terminal
Ubuntu 用得好好的弄 CentOS 做啥。