Ruby China
  • 社区
  • 招聘
  • Wiki
  • 酷站
  • Gems
  • 注册
  • 登录
jgm
@kayakjiang
高级会员
第 314 位会员 / 2011-11-29

13 篇帖子 / 259 条回帖
62 关注者
0 正在关注
232 收藏
技多不压身
GitHub Public Repos
  • mybt_coin 38

    高仿比特币, 目的是帮助人们在本地环境轻松并且完整地验证区块链技术的核心概念和核心算法

  • weui-base-guide-practice 20

    对微信设计指南中的Web设计和小程序基础控件库的练习

  • mongo_image_demo 3

    build a image server using mongodb

  • baya.github.io 2

    舠

  • block7days 2

  • activeadmin_debug 1

  • bluedoc 1

    An open-source document management tool for enterprise self host.

  • blog-1 1

    煎鱼的博客,有点忙。

  • audit-log 1

    📑 Create audit logs into the database for user behaviors, including a web UI to query logs.

  • bitcoin 1

    Bitcoin Core integration/staging tree

More on GitHub
  • 概况
  • 话题
  • 回帖
  • 收藏
  • 正在关注
  • 关注者
  • # 抵制浪费时间的编码面试 # 用一个开源的方式来说明 at 2015年04月18日

    手痒我也贴个解法,顺便支持下楼主

    data = {
      one: 1,
      two: 2,
      three: 3,
      four: 4,
      five: 5,
      six: 6,
      seven: 7,
      eight: 8,
      nine: 9,
      times: '*',
      plus: '+',
      minus: '-',
      divided_by: '/'
    }
    
    data.each  do |k, v|
      define_method(k) do |arr = []|
        res = [v].concat(arr)
        if res.size == 3
          ln, op, rn = res
          ln.send(op, rn)
        else
          res
        end
      end
    end
    
    
  • ETL with Ruby at 2015年04月15日

    炮哥的数据仓库系列将坛子的逼格提高了好几档

  • Data Warehouse Schema Design at 2015年04月13日

    很有意思,我们现在的电商系统里很多上百行的统计 sql,可以用这种设计简化下

  • 用 ReactNative 写了个 RubyChina 客户端,写得内牛满面 at 2015年04月06日

    感觉 ReactNative 很强大,特别是在 view 这一块,很少的代码就构建了一个比较优雅的交互界面

  • Ruby China 要有小弟妹啦 at 2015年03月30日

    这做个论坛跟玩似的

  • Service Object: What? Why? and How? at 2015年03月22日

    殊途同归,看来大家都在这么干了,Service Object 是精简 Controller 代码非常好的一个手段,简单直接,无副作用,容易移植,方便测试。

  • 跟风学 Sketch, 拙劣临摹一张 at 2015年03月20日

    #7 楼 @fresh_fish 我以为花了钱,会认真学的,结果不感兴趣了,改天放百度云盘上送给你

  • 跟风学 Sketch, 拙劣临摹一张 at 2015年03月20日

    我买了个正版的 sketch,画了个表单,然后就决定不抢设计师的饭碗了

  • [深圳] DJI 大疆创新公司招聘 Ruby on Rails 工程师 3 名 (内推 15-30k) at 2015年03月09日

    这个飞机在军事论坛很火

  • 一个基于 Rails 的 RESTful API 框架: Lina at 2015年02月28日

    lina 生成的文档里没有响应样例,如果能把响应样例加上去,那就比较好了。

  • 10 Most Common Rails Mistakes at 2015年01月28日

    staging 环境的数据库要比 production 环境的数据库慢 100 倍

  • [北京] 实现 团队招聘 Rails 工程师:Live in the future and build what's missing at 2015年01月21日

    很好的一个平台,可以看做是众筹的一个进化,参与的人员不再是简单的出出钱,而是以一种专业的角色直接参与到项目的设计与开发中

  • 囚徒健身网站,欢迎吐槽 at 2015年01月19日

    我刚跨过墙壁俯卧撑这一关,出狱遥遥无期啊

  • [前端知识] Flexbox,更优雅的布局 at 2015年01月18日

    很赞的文章,自己不动手做做感觉会辜负楼主似的

  • block call 如何传参的问题 at 2014年12月05日

    @luffycn h 这个参数肯定能传的

    class Foo
    
      def method_missing name, *args, &block
        puts name    
        puts args.inspect 
        puts block.parameters.inspect 
      end
    
    end
    
    Foo.new.href 'h2 a' do |h|
      h.first['href'].strip
    end
    
    

    href ["h2 a"] [[:opt, :h]]

    我觉得你现在的问题是什么时候给 :h 这个参数赋值,因为你现在的 href 其实是一个不存在的方法,所以你只能在 method_missing 里给 :h 一个实在的值

  • Is Rails Slow? by Akira Matsuda at 2014年11月08日

    同样都是用 haml,为什么 sinatra 要快这么多呢?

  • Grape + RSpec 测试 如何 mock at 2014年11月03日

    试下这个 allow(instance_double(@club.class)).to receive(:is_admin?).and_return(true) 或者 allow(instance_double(@club)).to receive(:is_admin?).and_return(true)

  • Grape + RSpec 测试 如何 mock at 2014年11月03日

    allow(@club) 那这个 @club 从哪里来的?

  • Grape + RSpec 测试 如何 mock at 2014年11月03日

    club = fetch_club 是不是要改成 @club = fetch_club ?

  • [北京] Melotic 招聘 Ruby/Front-end Engineer at 2014年10月27日

    #9 楼 @xtao 已经收到答复了,多谢

  • [北京] Melotic 招聘 Ruby/Front-end Engineer at 2014年10月23日

    @xtao 我前天给你们的这个邮箱 [email protected] 投了份简历,现在 24 小时过去了,还没有收到答复,至少给个答复哈,让我知道你们收到邮件了。

  • Rails 重构: 利用 Service 优化 Fat Model at 2014年10月22日

    不错的帖子,我提些看法,首先refresh_by_order_contact 和 refresh_from_order_contact 到底是哪个呢?:) 我觉得 UserContact#update_by_order_contact 和 UserProfile#update_by_order_contact 这两个方法可能需要放到类 UserInfoService 中去实现,理由两点:

    1. 让 UserContact 和 UserProfile 两个模型更瘦了

    2. 根据你目前提供的场景,在 UserInfoService 之外单独调用UserContact#update_by_order_contact 或者 UserProfile#update_by_order_contact 的情况应该不被允许或者不存在。

    我做的一些项目和楼主说的情况比较类似,但是有些地方用到了事务,这些事务都放到了 service 中,然后这些涉及到多个模型的更新必须在这些 service 中去实现。

  • [转] 互联网招聘文案的正确解读方法 at 2014年10月13日

    大部分亲自体验过,简直不能同意再多

  • 《Linux 命令行》中文版 PDF 上线了,epub 也上了 at 2014年10月04日

    正在读,好书

  • 聊聊 Ruby 中的 block, proc 和 lambda at 2014年09月26日

    #47 楼 @chiangdi 多看几遍

  • undefined method `each' for nil:NilClass at 2014年09月20日

    #10 楼 @guojinlong 从各种坑中爬过的码农而已,举手之劳不用客气。

  • undefined method `each' for nil:NilClass at 2014年09月20日

    你把 index 写在了 private 下面,肯定是访问不到 index 方法了,但是这种情况下 rails 会继续渲染 index.html.erb, 这时 @articles 为 nil, 就造成了错误,如果能访问到 index 方法,@articles 就不会是 nil。你可以试试把 index 方法去掉,会报同样的错误。

  • God 使用手册 at 2014年09月18日

    设置工作目录

    默认地,God设置工作目录到/之前运行你的进程

    这块翻译的不够通顺,有点不好理解,看了原文是 By default, God sets the working directory to / before running your process,才理解。 翻译成 在运行你的进程之前,God 默认会把工作目录设置到 /,强调的是 God 怎么设置工作目录。

    总之感谢楼主的工作。

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