Ruby China
  • 社区
  • 招聘
  • Wiki
  • 酷站
  • Gems
  • 注册
  • 登录
吕成鹏
@onemagicant
会员
第 5597 位会员 / 2013-02-04

杭州
3 篇帖子 / 84 条回帖
8 关注者
5 正在关注
5 收藏
铁板烧的日子
GitHub Public Repos
  • parse-server-jobs-sche... 2

  • GB2260.rs 1

    The Rust implementation for looking up the Chinese administrative divisions.

  • chinese_pinyin 1

  • dota2_api 1

  • wxapp_phoenix_websocke... 1

    Phoenix Framework Websocket Client For WeChat App

  • helm-charts 0

  • kendra-video-to-audio 0

    Split video into audios

  • ngx-drag-drop 0

    Angular directives using the native HTML Drag And Drop API

  • nginx-ebpf-trace 0

  • trojan-manager 0

More on GitHub
  • 概况
  • 话题
  • 回帖
  • 收藏
  • 正在关注
  • 关注者
  • [北京 / 上海] 爱奇艺招聘 Web/ 分布式 开发实习生 at 2013年11月22日

    看到个 爱奇艺 VIP 用户优先 真是赞

  • Ruby 官网新设计 (結果公布) at 2013年11月09日

    六号主题性挺强的,四号的典雅

  • 介绍我的项目 + 找一份工作 at 2013年11月01日

    屌爆了

  • 推酷送书活动 at 2013年09月16日

    注册的时候放弃了。。因为我忘了新浪微博的密码。。。

  • Ruby 学习视频教程 at 2013年07月30日

    #18 楼 @blackanger 太棒了,已经准备好金币了

  • Ruby 学习视频教程 at 2013年07月30日

    rails 会讲不?

  • [上海]「简书」诚聘 RoR 实习生,200/ 天 (已结束) at 2013年07月21日

    已发,求人品

  • [南京] 暴走漫画招聘 rails 程序员 (内有无节操图,慎入) at 2013年07月11日

    节操呢

  • rails 4 的表关联的问题 at 2013年07月04日

    We start by creating a migration: depot> rails generate migration combine_items_in_cart This time, Rails can’t infer what we are trying to do, so we can’t rely on the generated change() method. What we need to do instead is to replace this method with separate up() and down() methods.

    class CombineItemsInCart < ActiveRecord::Migration
        def up
            Cart.all.each do |cart|
                sums=cart.line_items.group(:product_id).sum(:quantity)
                sums.each do |product_id,quantity|
                    if quantity>1
                        cart.line_items.where(product_id:product_id).delete_all
                        item=cart.line_items.build(product_id:product_id)
                        item.quantity=quantity
                        item.save!
                    end
                end
            end
        end
        def down
            LineItem.where("quantity>1").each do |line_item|
                line_item.quantity.times do
                    LineItem.create cart_id: line_item.cart_id,product_id: line_item.product_id,quantity:1
                end
                line_item.destroy
            end
        end
    end
    

    新版的 agile web development with rails 4 beta 里面的。

  • splat arguments 这个翻译成中文怎么讲? at 2013年06月29日

    #2 楼 @lidashuang 貌似没人答,洗洗睡吧

  • splat arguments 这个翻译成中文怎么讲? at 2013年06月29日

    我去啊。。我还是意会吧

  • 上班族学习外语最佳神器 MemoryForcer。求下载使用支持。 at 2013年06月22日

    #83 楼 @hlxwell 每次打开的时候都要选择一次在列表里面选择背哪个字典,能继续上一次就好了。

  • 上班族学习外语最佳神器 MemoryForcer。求下载使用支持。 at 2013年06月20日

    #80 楼 @hlxwell 已经买了,有意见会提的。。

  • 上班族学习外语最佳神器 MemoryForcer。求下载使用支持。 at 2013年06月20日

    要翻墙才行啊,本地信息能不能跟你的服务器同步额?

  • 发来你就觉得最酷的一段代码,我要把它印成 T 恤 at 2013年05月19日

    #49 楼 @kevinxu 太贵了

  • 《Programming Ruby 1.9 & 2.0 (4th edition)》和《Agile Web Development with Rails (4th edition)》已经发布 / 更新 at 2013年05月15日

    有没有下载地址啊,学生外国网买不了。。

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