Ruby China
  • Topics
  • 招聘
  • Wiki
  • 酷站
  • Gems
  • Sign Up
  • Sign In
Rei
@Rei
Admin
NO. 1 / 2011-10-28

[email protected]
深圳
182 Topics / 9132 Replies
727 Followers
0 Following
11 Favorites
中下水平 Rails 程序员
Reward
GitHub Public Repos
  • writings 940

    [Closed] Source code of writings.io

  • alipay 732

    Unofficial alipay ruby gem

  • code_campo 291

    [Closed] Source code of http://codecampo.com

  • asciidoctor-pdf-cjk-ka... 101

    **no longer maintained**

  • asciidoctor-htmlbook 31

    Asciidoctor HTMLBook is an Asciidoctor backend for converting AsciiDoc documents to HTMLBook docu...

  • material-ui 17

  • rich-text-editor 12

  • htmlrenderer 12

  • rails-chatgpt-demo 8

  • rails-app 7

    A Rails project template lets me start new projects quickly.

More on GitHub
  • Overview
  • Topics
  • Replies
  • Favorites
  • Following
  • Followers
  • 选择 LESS 还是 SASS? at January 06, 2014

    #11 楼 @xautjzd 前面说的是 bootstrap 官方,不是 rails 官方。turbolinks 是属于 rails 官方的。

  • 选择 LESS 还是 SASS? at January 06, 2014

    #8 楼 @xautjzd 从官方网站看 github repo 地址,然后看这个帐号的其他项目。

  • 选择 LESS 还是 SASS? at January 06, 2014

    #6 楼 @xautjzd https://github.com/twbs/bootstrap-sass 官方的

  • 选择 LESS 还是 SASS? at January 06, 2014

    #3 楼 @cassiuschen 一段时间没看 less 了,可能有出入。therubyracer 是 js runtime,要编译 less 总需要 less 库吧。

  • 选择 LESS 还是 SASS? at January 06, 2014

    Sass。在 Rails 引入 Less 库要依赖 less-rails,它打包了一个 js 库,这样就多了一个依赖,而且我记得这个 gem 不太完善。

  • 安装 Ruby, Rails 运行环境 wiki 的 ubuntu 系统环境命令不见了 at January 06, 2014

    rvm 现在自动装包了。

  • 小数据,需要便捷访问,不存数据库,应该放在那里? at January 05, 2014

    #5 楼 @fengzhe 固定值,而且和逻辑绑定的,就用常量行了。

  • 小数据,需要便捷访问,不存数据库,应该放在那里? at January 05, 2014

    我又看了一遍

    需要给页面一个属性 type。

    这不是页面的一个字段吗?

  • 小数据,需要便捷访问,不存数据库,应该放在那里? at January 05, 2014

    type 太多含义了,看完还是没了解场景。一般来说:

    1. yaml
    2. config
  • 别用 raw 和 html_safe at January 05, 2014

    #25 楼 @chechaoyang 有人会觉得自己已经处理过了所以安全了,我总是为所有需要输出 HTML 的内容加 sanitize,除非是 SiteConfig 这种只有管理员输入、可能带有 javascript 的内容。

  • 别用 raw 和 html_safe at January 05, 2014

    #7 楼 @hhuai 如果发现漏洞第一时间邮件管理员,我会很感激你的。

  • 别用 raw 和 html_safe at January 05, 2014

    #18 楼 @bhuztez #19 楼 @jasl http://guides.rubyonrails.org/security.html#css-injection 找到例子

  • 别用 raw 和 html_safe at January 05, 2014

    #13 楼 @jasl #16 楼 @bhuztez 允许 style 属性会导致怎样攻击?

  • 别用 raw 和 html_safe at January 05, 2014

    #10 楼 @aptx4869 有片段缓存,其实 body_html 我觉得都不用。

  • 别用 raw 和 html_safe at January 05, 2014

    #4 楼 @aptx4869 markdown 的过滤漏了一些,毕竟它不是专门做过滤的。

  • 大家平时做注册登录模块都是自己写还是借助第三方? at January 04, 2014

    昨天试了一下 Persona,发现不友好的地方:

    • 如果需要补充字段,还是需要表单
    • Yahoo/Gmail 以外的邮箱需要在 Persona 设置密码

    整个登陆流程会让人困惑,所以我还是选择用 bcrypt 加密自己写登陆逻辑。

  • 大家平时做注册登录模块都是自己写还是借助第三方? at January 03, 2014

    用 Mozilla Persona http://chloerei.com/2013/12/06/mozilla-persona/

  • 关于 ajax 的一点疑问 at January 03, 2014

    先 evert.preventDefault() 然后在动画的 callback $form.submit() 看看。

  • Ruby 的上手教程更新了 at January 03, 2014

    没看明白,这是楼主自己写的教程然后通过 QQ 群分发吗?

  • Assets management solved: we released Rails Assets at January 03, 2014

    #31 楼 @ytwman 正常情况这两个符号不会引起错误,贴你的代码和错误看看。

  • 发现论坛的一个小瑕疵,关于 CSS 的 at January 02, 2014

    #9 楼 @tyaccp_guojian 多谢,已部署。

  • osx+iterm+oh-my-zsh+rvm | type rvm = rvm is a shell function at January 02, 2014

    #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.

  • osx+iterm+oh-my-zsh+rvm | type rvm = rvm is a shell function at January 02, 2014

    #13 楼 @RainFlying 我把 .bash_profile 删除,在 .profile 里面加一句 echo '.profile' ,然后开新的终端,有显示出 .profile。然后把 .bash_profile 恢复,开新的终端,就不显示 .profile 了。

  • osx+iterm+oh-my-zsh+rvm | type rvm = rvm is a shell function at January 02, 2014

    有的系统默认有一个 .profile,然后 rvm 生成了 .bash_profile,然后有的 login shell 在有 .bash_profile 的情况下就不会读取 .profile 了,所以提醒你要在 .bash_profile 里面 source .profile,但是如果你在 .profile 里面没有什么内容就不用管了。

  • mongoid 排序问题 at January 02, 2014

    #3 楼 @crazyjin 我指 Class 后面跟一个 block。

    #4 楼 @crazyjin 我查了一下不支持直接根据 $size 排序的,除非用 Aggregation 等查询时运算的方法,不知你觉得这个开销值不值得了。

    http://stackoverflow.com/questions/9040161/mongo-order-by-length-of-array

  • mongoid 排序问题 at January 02, 2014

    正题:加个 books_count 字段。

  • mongoid 排序问题 at January 02, 2014
    Person {
    include Mongoid:Document
    has_many :books
    }
    

    这是什么表示法……

  • 做 Rails 项目需要哪些数据库的知识? at January 01, 2014

    对项目要用的数据库越熟练越好,只懂 ActiveRecord 不行。

  • Prev
  • 1
  • 2
  • …
  • 150
  • 151
  • 152
  • 153
  • 154
  • …
  • 272
  • 273
  • Next
关于 / RubyConf / Ruby 镜像 / RubyGems 镜像 / 活跃会员 / 组织 / API / 贡献者
由众多爱好者共同维护的 Ruby 中文社区,本站使用 Homeland 构建,并采用 Docker 部署。
服务器由 赞助 CDN 由 赞助
iOS 客户端 / Android 客户端 简体中文 / English