Ruby China
  • Topics
  • 招聘
  • Wiki
  • 酷站
  • Gems
  • Sign Up
  • Sign In
小格鸡
@dotnil
VIP
NO. 134 / 2011-11-19

杭州
13 Topics / 260 Replies
1 Followers
0 Following
2 Favorites
mux.alimama.com/join
GitHub Public Repos
  • leoric 225

    👑 JavaScript ORM for MySQL, PostgreSQL, and SQLite.

  • ssh-config 81

    📟 SSH config parser and stringifier

  • cyjake.github.io 6

  • datahub-view 1

    view layer for DataHub

  • 2011 1

    Archive of 2011

  • swc-plugin-import 1

  • swc 0

    Rust-based platform for the Web

  • font-toolkit 0

    A Rust 🦀️ font loading, positioning and rendering toolkit

  • plugins 0

    Plugins for swc, written in rust

  • midway 0

    🍔 A Node.js Serverless Framework for front-end/full-stack developers. Build the application for n...

More on GitHub
  • Overview
  • Topics
  • Replies
  • Favorites
  • Following
  • Followers
  • save 总是保存不上 大家帮看一下代码 (结帖) at November 23, 2012

    #16 楼 @HungYuHei 原来如此!我还记得看 Agile 那本书的时候看到过这个的,忘记这茬了

  • save 总是保存不上 大家帮看一下代码 (结帖) at November 23, 2012

    似乎真的是个坑,打开 rails console ,试试这样:

    t.likeable << '127.0.0.1'
    t.likeable_changed?
    

    我这边返回的是个 false,猜想是这个原因导致 t.save 的时候没有生成任何 UPDATE 语句 大牛们 @fredwu @luicore @saito @huacnlee 可以去提 issue 和 pull request 了

  • Mac 下 有什么好的记单词 带有生词本工具 at November 23, 2012

    同求

  • RubyConfChina 2012 照片汇总 at November 23, 2012

    我也拍了几张 http://www.flickr.com/photos/dotnil/sets/72157632044516691/

  • RubyConf China 2012 参会印象 at November 23, 2012

    更正博主一个错误,FAQ frequently asked questions 即常见问题,用在这里似乎不太准确吧?应该用 QA

  • 单个页面才需要的 js 你们一般怎么安排? at November 23, 2012

    #20 楼 @tumayun 我在鄙公司担任的主要职务就是 UED,不过我可以放到 assets,自然也会用 Asset Pipeline 哈哈

  • Ruby 如何判断一个数组中是否有重复元素? at November 22, 2012

    #16 楼 @skandhas 我说错了吗?

  • 请教一下 rails 论坛程序选择 at November 22, 2012

    rabel 使用 nginx + unicorn 没问题的,我就是这么干的

  • Ruby 如何判断一个数组中是否有重复元素? at November 22, 2012

    #13 楼 @gaicitadie 于是越来越慢了……

  • 单个页面才需要的 js 你们一般怎么安排? at November 22, 2012

    我一直是分开的,目录类似

    ├── site
    │   └── works.js
    └── modules
        └── avatar.js
    

    modules 下放公共的 js 模块 site 下放实际页面中引用的 js,并且通常是 per action 的,例如我的项目里有个 work 类型,则在它的列表页会有 works.js,在详情页有 work.js,表单页则是 work_form.js(因为 new 和 edit 页面都会要)

    然后,在 config/application.rb 里,记得告诉 sprocket 压缩 site 下的文件:

    config.assets.precompile += [/site\/\w+\.js/]
    
  • "Please commit your changes and try again." at November 22, 2012

    #6 楼 @smilekk 看来我误会你了,抱歉;命令行一贯比 GUI 靠谱,哈哈

  • "Please commit your changes and try again." at November 22, 2012

    commit 之前,有没有 git add 过了哦 如果不熟悉 git,可以先看看我翻译的 git reference http://gitref.cyj.me/zh/

  • Ruby 如何判断一个数组中是否有重复元素? at November 22, 2012

    #6 楼 @luikore 哇,原来这里的返回值还有差别

  • Ruby 如何判断一个数组中是否有重复元素? at November 22, 2012

    #7 楼 @metal 你是说纯数字的 array 么?也一样执行的哇

  • 贴一个刚才发现的 ruby-china 网站彩蛋 at November 22, 2012

    好奢侈的彩蛋,哈哈哈

  • Ruby 如何判断一个数组中是否有重复元素? at November 22, 2012

    弄个 hash 一个个往里塞…… 遇到塞过的就是有重复的了…… 不知道快慢……

  • 单个页面才需要的 js 你们一般怎么安排? at November 22, 2012

    #2 楼 @fresh_fish 拿楼主的 app/assets/javascripts/aaa.js 做例子,文件名改成 aaa.js.erb,然后就可以在文件里面 <%= Rails.env.production? ? 'serious' : 'crazy' %> 了

    另一种方式就是页面提供一个全局变量,在 View 里头用 <%= javascript_tag %> 输出出来,然后在 js 代码中判断就行

  • 阿里系同学召集贴 at November 20, 2012

    一淘-UX - 逸才 欢迎大家来 http://ux.etao.com 观光,没错,这个网站是用 Rails 写的

  • 上海归来,写点感受,及读音的重要性 at November 20, 2012

    #46 楼 @luikore 哈哈哈,这几个例子好,所以没必要就别拽英文,说多错多;最绕口的常见单词应该是 statistics,同样的,static 跟它的发音方式也是不同的……

  • 上海归来,写点感受,及读音的重要性 at November 20, 2012

    #44 楼 @outman 哈哈,你可以看看这个电影,《欧洲性旅行》, http://movie.douban.com/subject/1308773/ 男猪脚犯了跟你一样的错误

  • 上海归来,写点感受,及读音的重要性 at November 20, 2012

    #37 楼 @xiaolai 哈哈,都加了

  • 上海归来,写点感受,及读音的重要性 at November 20, 2012

    #35 楼 @poshboytl 恩,我是在美剧《how i met your mother》里听到的,有个龙套女名叫 jasmine,是个好名字

  • 上海归来,写点感受,及读音的重要性 at November 20, 2012

    #28 楼 @xiaolai 很少用 gtalk,不过已经加了

  • 上海归来,写点感受,及读音的重要性 at November 20, 2012

    #31 楼 @poshboytl jasmine 读错了,哈哈哈

  • 能否设立一个节点:紧急问题 at November 19, 2012

    哈哈哈,有了这个节点之后,冰天雪地,720 空翻,跪地裸求 也会很快出来的

  • 上海归来,写点感受,及读音的重要性 at November 19, 2012

    #24 楼 @huacnlee 一个个改嘛,不知道怎么念不要偷懒,查一下字典,哈哈哈

  • 可以吐槽一下拍照的事情么。。。。 at November 19, 2012

    我都很低调地躲后边拍,即使站起来,完事也就立马坐下的

  • 有人会把 Ruby 默念成 [ˈrʌbi] 吗? at November 19, 2012

    #9 楼 @Teddy aiueo,那个 e 不是你说的 ae?

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