Ruby China
  • Topics
  • 招聘
  • Wiki
  • 酷站
  • Gems
  • Sign Up
  • Sign In
吕成鹏
@onemagicant
Member
NO. 5597 / 2013-02-04

杭州
3 Topics / 84 Replies
8 Followers
5 Following
5 Favorites
铁板烧的日子
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
  • Overview
  • Topics
  • Replies
  • Favorites
  • Following
  • Followers
  • [北京 / 上海] 爱奇艺招聘 Web/ 分布式 开发实习生 at November 22, 2013

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

  • Ruby 官网新设计 (結果公布) at November 09, 2013

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

  • 介绍我的项目 + 找一份工作 at November 01, 2013

    屌爆了

  • 推酷送书活动 at September 16, 2013

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

  • Ruby 学习视频教程 at July 30, 2013

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

  • Ruby 学习视频教程 at July 30, 2013

    rails 会讲不?

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

    已发,求人品

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

    节操呢

  • rails 4 的表关联的问题 at July 04, 2013

    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 June 29, 2013

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

  • splat arguments 这个翻译成中文怎么讲? at June 29, 2013

    我去啊。。我还是意会吧

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

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

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

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

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

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

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

    #49 楼 @kevinxu 太贵了

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

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

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