Ruby China
  • 社区
  • 招聘
  • Wiki
  • 酷站
  • Gems
  • 注册
  • 登录
Martin
@martin91
会员
第 4755 位会员 / 2012-11-27

深圳
45 篇帖子 / 1467 条回帖
100 关注者
7 正在关注
26 收藏
打赏作者
GitHub Public Repos
  • paperclip-storage-aliyun 22

    Extend the Paperclip with Aliyun Storage

  • rong_cloud 10

    融云 Server API Ruby 语言 SDK

  • jianggaowang-1 1

    Jianggaowang official repository

  • excel-writors-benchmark 1

    Benchmarks for writing excel by different languages

  • gofixtures 1

    Ruby on Rails' style test fixtures for Golang

  • aes-encryption-benchmark 0

  • binance-public-data 0

    Details on how to get Binance public data

  • techparty-org.github.io 0

    珠三角技术沙龙 blog 官网

  • hikvision-isecure-pyth... 0

    python SDK for interacting with HIKVISION iSecure APIs / 用于海康威视综合安防管理平台的 Python SDK

  • hugo-black-and-light-t... 0

More on GitHub
  • 概况
  • 话题
  • 回帖
  • 收藏
  • 正在关注
  • 关注者
  • [广州][2015年04月17日] GZRUBY 第 24 次聚会 - 19:00 at 2015年03月25日

    #2 楼 @flowerwrong 不会吧,你微信号多少,我来加你进去

  • 能够给 iOS 的 Siri 灌内容吗? at 2015年03月25日

    应该没有吧,不过你可以自己写一个 https://github.com/jhauswald/sirius

  • 上周开发的一款 Markdown 编辑器: Markdown Plus at 2015年03月20日

    #15 楼 @tylerlong 这执行力,佩服!

  • 请教大家关于多条件查询这种场景,应该按照什么思路去做 at 2015年03月20日

    #8 楼 @shaunli 多选的话就要用到 or 断言,可以用 Rails 自带的 arel 组件实现。示例代码:

    products = Product.arel_table
    
    Product.where(products[:publishing_house].eq('人民邮电出版社').or(products[:publishing_house].eq('清华大学出版社')))
    

    呃,这种写法有点长呢,可以用 inject(:or) 拼接断言呢,比如这种写法: https://github.com/spree/spree/blob/master/core/app/models/spree/product.rb#L157-L163

    def self.like_any(fields, values)
      where fields.map { |field|
        values.map { |value|
          arel_table[field].matches("%#{value}%")
        }.inject(:or)
      }.inject(:or)
    end
    

    Spree 中的这段代码用于查询产品,fields 是需要匹配的字段,values 是选中的值。

  • 请教大家关于多条件查询这种场景,应该按照什么思路去做 at 2015年03月20日

    #8 楼 @shaunli 多选的话就要用到 or 断言,可以用 Rails 自带的 arel 组件实现。示例代码:

    products = Product.arel_table
    
    Product.where(products[:publishing_house].eq('人民邮电出版社').or(products[:publishing_house].eq('清华大学出版社')))
    

    呃,这种写法有点长呢,可以用 inject(:or) 拼接断言呢,比如这种写法: https://github.com/spree/spree/blob/master/core/app/models/spree/product.rb#L157-L163

    def self.like_any(fields, values)
      where fields.map { |field|
        values.map { |value|
          arel_table[field].matches("%#{value}%")
        }.inject(:or)
      }.inject(:or)
    end
    

    Spree 中的这段代码用于查询产品,fields 是需要匹配的字段,values 是选中的值。

  • 你们更换成 taobao 的 gem 后 fetching 显示的是什么? at 2015年03月19日

    #2 楼 @sensi bundle install 的时候,fetching target 就是 Gemfile 里边首行的 source:

    # Gemfile
    source "https://rubygems.org"
    
    gem 'xxx'
    

    而 gem source -l里边显示的 source 是在你执行 gem install xxx 才有用的。

  • 用免费的 Heroku,(paper/carrier)有什么方法可以存图片么?想花几分钟,部署一个玩具。 at 2015年03月19日

    用七牛的呗,直接就上传了,免费额度也非常大,够你玩的了

  • 新人求助,是需要简单重构还是推倒重写? at 2015年03月19日

    学到了新的命令 rake stats,哈哈,原来一直孤陋寡闻了

  • 新手学习 Rails,看 Devise 代码无从下手 at 2015年03月18日

    #9 楼 @Rei 赞同!一般我会在自己的项目中尽量用 Rails 自带的基础接口,has_secure_password 就解决了很多问题了,没必要一上来就上 devise。

  • 上周开发的一款 Markdown 编辑器: Markdown Plus at 2015年03月18日

    #10 楼 @peter 我也想啊,不过最近好忙的说。

  • 上周开发的一款 Markdown 编辑器: Markdown Plus at 2015年03月18日

    #6 楼 @peter 刚才看了下,是有插件可以轻松实现 saveas 功能的,传送门: https://github.com/nwjs/nw.js/wiki/File-dialogs#save-file

  • 上周开发的一款 Markdown 编辑器: Markdown Plus at 2015年03月18日

    #6 楼 @peter 这个还真没研究过

  • 上周开发的一款 Markdown 编辑器: Markdown Plus at 2015年03月17日

    结合 node-webkit 就能发布桌面版了吧

  • Ruby support in Firefox Developer Edition 38 at 2015年03月06日

    #6 楼 @Rei 明白。

  • Ruby support in Firefox Developer Edition 38 at 2015年03月06日

    以前就知道了,但是好像都没有见到应用。

  • Spree 源码导读 at 2015年03月05日

    #7 楼 @zhaozijie 👌 感谢!

  • Spree 源码导读 at 2015年03月05日

    我只想问,楼主用的什么画图工具?

  • [上海] Ekohe 招聘前端 / iOS / Ruby on Rails 工程师 at 2015年03月05日

    首当其冲:当:承当,承受;冲:要冲,交通要道。比喻最先受到攻击或遭到灾难。

    Suggestion: 当务之急。

    Sorry, 我对文字有点敏感,楼主别打我。

  • Puma 源代码分析 - 单进程模式 at 2015年03月03日

    先占个沙发 :plus1:

  • Puma 源代码分析 - 概述 at 2015年03月03日

    #13 楼 @ylt 非常牛!

  • 有人用七牛来存图片吗? at 2015年02月12日

    可以,七牛的文件处理功能比较全面,我在 讲稿网 里的所有 PDF 都是通过七牛转成图片并且完成图片处理的。

  • 推荐个 商城的开源项目? at 2015年02月12日

    RoR 的肯定就只有 Spree 了,这个项目很活跃,每次我都喜欢推荐大家去看 Spree 的源码。

  • 新浪网招聘运维开发工程师 (DevOps) at 2015年02月06日

    #1 楼 @windwrite 招人都能懒到这种程度了,就这么点诚意还想找到人???

  • 哪里有常用 gem 的比较详细的介绍 at 2015年02月02日

    点击 Homepage 看不就行了。赞同楼上的路线图。

  • [广州][2015年01月31日] GZRuby 第 23 次聚会活动总结 at 2015年02月02日

    已经更新讲稿链接,可直接点击讲稿链接查看讲师讲稿

  • [广州][2015年01月31日] GZRUBY 第 23 次聚会 - 15:00 at 2015年01月30日

    #22 楼 @ruby_sky 加班是拒绝爱的借口!你看着办哈

  • [广州][2015年01月31日] GZRUBY 第 23 次聚会 - 15:00 at 2015年01月30日

    #21 楼 @panpanpanpan 没事,欢迎随时过来侃!

  • [广州][2015年01月31日] GZRUBY 第 23 次聚会 - 15:00 at 2015年01月29日

    #19 楼 @Tony612 欢迎你也来一个!

  • [广州][2015年01月31日] GZRUBY 第 23 次聚会 - 15:00 at 2015年01月27日

    #16 楼 @maqianlie 已经更新第一个演讲主题。

  • [广州][2015年01月31日] GZRUBY 第 23 次聚会 - 15:00 at 2015年01月27日

    #16 楼 @maqianlie presentation 的主题讲师还在斟酌中,这两天会公布呢。

  • 上一页
  • 1
  • 2
  • …
  • 20
  • 21
  • 22
  • 23
  • 24
  • …
  • 47
  • 48
  • 下一页
关于 / RubyConf / Ruby 镜像 / RubyGems 镜像 / 活跃会员 / 组织 / API / 贡献者
由众多爱好者共同维护的 Ruby 中文社区,本站使用 Homeland 构建,并采用 Docker 部署。
服务器由 赞助 CDN 由 赞助
iOS 客户端 / Android 客户端 简体中文 / English