Ruby China
  • 社区
  • 招聘
  • Wiki
  • 酷站
  • Gems
  • 注册
  • 登录
riki
@rikiwong
会员
第 24553 位会员 / 2016-01-12

[email protected]
北京
0 篇帖子 / 44 条回帖
0 关注者
0 正在关注
8 收藏
GitHub Public Repos
  • stable-diffusion-webui 0

    Stable Diffusion web UI

  • WechatBot 0

  • ws 0

    Simple to use, blazing fast and thoroughly tested WebSocket client and server for Node.js

  • yhm 0

More on GitHub
  • 概况
  • 话题
  • 回帖
  • 收藏
  • 正在关注
  • 关注者
  • 配置本地 ssh key 问题 at 2017年06月06日

    用 git bash, 安装 git 后就有,或者 xshell, cygwin, mobaxterm, 虚拟机,Ubuntu on Windows 等等

  • kindeditor 上传图片的问题 at 2017年06月06日

    不知道 没用过这个 gem

  • 有没有类似 simple_form 但用起来更加灵活的表单插件? at 2017年06月06日

    用官方的 form helper 方法就可以,之前论坛有详细的官方 form 方法教程。

    ----分割线----

    已经找到了 https://ruby-china.org/topics/31898

  • kindeditor 上传图片的问题 at 2017年06月06日

    未定义skip_before_filter 用skip_before_action 官方 gem 已经更新了,所以你 update 下 gem 就 OK 了

  • [北京] 求一个 Ruby 职位 at 2016年11月07日

    #5 楼 @harryyoung 不懂玩网游和 工作有什么关系,业余时间玩网游 和 工作 应该不冲突吧。

  • Ruby class mixin 一个模块能否有些函数成为类函数,有些函数成为实例方法 at 2016年10月28日
    module Module
      module ClassMethods
    
      end
    
      module InstanceMethods
    
      end
    
      def self.included(receiver)
        receiver.extend         ClassMethods
        receiver.send :include, InstanceMethods
      end
    end
    
  • Rails 中路由怎么配置 # 锚点? at 2016年08月04日

    http://stackoverflow.com/questions/4981029/how-do-you-use-anchors-for-ids-in-routes-in-rails-3 可能这个会解决你的问题

  • 如何通过发送 JSON 数据到 create 动作? at 2016年08月01日

    用 curl 或者 postman 或者 js 的 ajax 向 youwebsitename.com/tickets 发送 post 请求

  • [北京][2016年8月6日] Ruby Saturday「活动召集」[北京 Rubyist 四周年随意纪念活动] at 2016年07月25日

    报名

  • 有个弟弟 (头脑还行) 现在高二,想学习软件开发,我想这样给他推荐。 at 2016年07月22日

    认识电脑(cpu, 内存,大概的工作原理)

    这条没必要吧

  • Rails 环境下 puts 的内容去向问题 at 2016年07月12日

    😎 文件太大

  • Rails 5 新功能 - 实现适用于不同场景的 ActiveRecord 验证 at 2016年07月07日

    👍 👍 👍

  • 内网部署大家一般都是怎么做的 at 2016年07月06日

    copy

  • 大家在生产服务器上面用什么发行版?如何保证服务器安全? at 2016年07月06日

    centos 稳定,免费

  • Rails 5 正式发布了 - Action Cable, API mode 以及其他新特性介绍 at 2016年07月01日

    😎 😎 😎 可以试一下 api mode.

  • 如何将 Chrome 变成开发利器,开发者们在用这些插件 at 2016年06月30日

    👍 👍 👍 👍 👍

  • 使用 163 邮箱的 SMTP 需要开启授权码,不知道 ActionMailer 是否有对应的授权码参数 at 2016年06月28日

    163 的授权码填到 :password项

  • 求助: Ruby 数组运用的问题 at 2016年06月07日

    #11 楼 @msg7086 666

  • 求助: Ruby 数组运用的问题 at 2016年06月07日

    #9 楼 @popmonker 按照我提供的代码,自己改一改,那个代码只是提供了一个思路。活学活用哦!

  • 求助: Ruby 数组运用的问题 at 2016年06月06日

    假如有个表 List,我查到了数据 lists, 人名为 name, 机种为 model, 日期为 date

    result = {}
    lists.each do |list|
      if result[list.name].present?
        if result[list.name][list.model].present?
          result[list.name][list.model] << list.date
        else
          result[list.name][list.model] = []
          result[list.name][list.model] << list.date
        end
     else
        result[list.name] = {"#{list.model}" => date}
      end
    end
    result
    
  • 求助: Ruby 数组运用的问题 at 2016年06月06日
    @item_pack = []
    @pack1 = []
    model_pack = {:name => {},:modellist =>[]}
    data_pack = {:model =>{},:date =>[] }
    
    model_pack[:name] = 1
    data_pack[:model] = "aaa"
    model_pack[:modellist] << data_pack
    data_pack = data_pack.dup
    model_pack[:name] = 2
    data_pack[:model] = "bbb"
    model_pack[:modellist] << data_pack
    
    @item_pack << model_pack
    
  • 关于 included 方法的问题 at 2016年05月31日

    看到了一种 included 的用法

    module Foo
      def self.included(base)
        base.extend(ClassMethods)
      end
    
      module ClassMethods
        def bar
          puts 'class method'
        end
      end
    
      def foo
        puts 'instance method'
      end
    end
    
    class Baz
      include Foo
    end
    
    Baz.bar # class method
    Baz.new.foo # instance method
    Baz.foo # NoMethodError: undefined method ‘foo’ for Baz:Class
    Baz.new.bar # NoMethodError: undefined method ‘bar’ for #<Baz:0x1e3d4>
    
  • (解决了问题、原理未搞清楚) 一个无比奇怪的错误,调试了 2 小时,完全不知道咋回事 at 2016年05月01日
    def default(params, options = {})
            ._where(params[:where])
            .order(params[:order]||"created_at desc")
    end
    

    这段代码,._where这种用法没见过,是否可改成_whereorself._where. 我尝试使用.where在 model 类里面使用,报语法错误,我想可能是不是这个原因呢。

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