Ruby China
  • Topics
  • 招聘
  • Wiki
  • 酷站
  • Gems
  • Sign Up
  • Sign In
Rei
@Rei
Admin
NO. 1 / 2011-10-28

[email protected]
深圳
189 Topics / 9169 Replies
732 Followers
0 Following
11 Favorites
中下水平 Rails 程序员
Reward
GitHub Public Repos
  • writings 941

    [Closed] Source code of writings.io

  • alipay 732

    Unofficial alipay ruby gem

  • code_campo 291

    [Closed] Source code of http://codecampo.com

  • asciidoctor-pdf-cjk-ka... 101

    **no longer maintained**

  • geeknote 34

  • asciidoctor-htmlbook 31

    Asciidoctor HTMLBook is an Asciidoctor backend for converting AsciiDoc documents to HTMLBook docu...

  • material-ui 17

  • rich-text-editor 12

  • htmlrenderer 12

  • rails-chatgpt-demo 8

More on GitHub
  • Overview
  • Topics
  • Replies
  • Favorites
  • Following
  • Followers
  • 请教,Rails 项目中调用 WebService 用什么? at May 07, 2012

    是指 soap? https://www.ruby-toolbox.com/categories/soap

  • 忘記密碼功能會發生錯誤 at May 07, 2012

    在这里提更好 https://github.com/ruby-china/ruby-china/issues

    这个问题已关注,多谢反馈。

  • Ruby China T 恤 宝雷杭团队 at May 07, 2012

    X 战警!

  • 系統帳號認證錯亂問題 at May 07, 2012

    #19 楼 @dqaria 也许找到问题所在(之一)了 https://github.com/ruby-china/ruby-china/commit/01a04f76c0e0d56d30ebf57028909d3fad26e81b

    根据你的 github id,在终端里手工给你绑到原帐号了,重登录试试。

  • Rails 3.2 的 Ajax 向导 at May 06, 2012

    #13 楼 @reducm 我试了一下 coffee.erb,不能正确处理,后来就把文中 coffee 部分内容去掉了。

    #14 楼 @quakewang 因为假设的例子是 :remote => true 这个 Rails 的 helper 都不用,所以用了 submit 事件发起 ajax 请求。也许例子二和一混淆了,我再补充一个例子二的 form。

  • 系統帳號認證錯亂問題 at May 06, 2012

    @cactis 的帐号异常,绑定了 3 个帐号,现在我把另外两个绑定删了。账户错误的朋友请登出一下。

    如果另外两个人从刚注册就绑定了错误帐号,那么实际上没有注册 ruby-china 帐号,要再注册一次。

    如果另外两人是有 ruby-china 帐号的,并且能用密码登录,可以登录后再绑定 github。(http://ruby-china.org/account/edit)

    如果是有 ruby-china 帐号,github 是唯一登录途径,那么可以使用找回密码功能,重设密码后重新绑定。

  • 多条查询如何使用 模型内在的分页?(比如 Kaminari) at May 05, 2012

    many-to-many 的话

    user.messages.page(params:page]).per(5) 
    
    

    就行了

  • Linux 下有比较好的 SSH 工具么? at May 05, 2012

    直接 ssh 不就好了

  • 多条查询如何使用 模型内在的分页?(比如 Kaminari) at May 05, 2012

    LZ 的例子查询结果是关联表的内容,我很疑惑这个查询的目的啊。

    User 和 Messages 的关系是 has_many 还是 has_and_belongs_to_many?一般状况用不着写 SQL 啊。

  • 多条查询如何使用 模型内在的分页?(比如 Kaminari) at May 05, 2012

    #6 楼 @lin_style

    1. 是的
    2. 分页是用 limit, offset
    3. includes 是 ActiveRecord 中辅助多表查询的方法,除了 includes 还有 joins,区别是 select 部分不同。
  • 请问异步 ajax 的通知是怎么实现的? at May 04, 2012

    即时性要求不高的用 Ajax 轮询,也就是 js 定时访问

  • 当一个 gem 在 rubygem.org 可以搜到,但是在 Rails 中安装这个 gem 时,却提示找不到 at May 04, 2012

    search for rmgick No entries found

  • 多条查询如何使用 模型内在的分页?(比如 Kaminari) at May 04, 2012

    #4 楼 @lin_style

    1. 你的需求其实可以用 includes 解决
    2. 纯 SQL 的时候,用 limit 和 offset 语句来实现分页
    3. paginate_array 传入 limit, offset, total_count 参数生产一个 PaginateArray 对象,是拿来给 paginate helper 用的。
  • 多条查询如何使用 模型内在的分页?(比如 Kaminari) at May 04, 2012
    # Wrap an Array object to make it paginatable
    # ==== Options
    # * <tt>:limit</tt> - limit
    # * <tt>:offset</tt> - offset
    # * <tt>:total_count</tt> - total_count
    def self.paginate_array(array, options = {})
      PaginatableArray.new array, options
    end
    
    

    https://github.com/amatsuda/kaminari/blob/master/lib/kaminari/models/array_extension.rb

  • 关于下一版本 Ruby China 的功能计划 at May 03, 2012

    以前做过一次 Timeline,不赞成做,Timeline 只需要 Twiitter 就够了。

    论坛最与众不同的地方就是可以看到意想不到的内容,follow 机制会导致视野越来越窄。

    目前内容展示的缺陷是低质内容(不经思考的提问、扯淡)过多,解决方案我赞成之前 @saito 提的首页用排序算法,只想阅读高质内容的可以只看首页,类似 hacknews。而喜欢扯淡的再点进主题列表页。

  • 安装 mysql2 gem 时出问题, *** extconf.rb failed *** at May 03, 2012

    sudo apt-get install libmysqlclient-dev

  • rails ajax 问题请教 at May 01, 2012

    #10 楼 @xoxoj jbuilder

  • rails ajax 问题请教 at May 01, 2012

    #5 楼 @xoxoj type 换 get 试试

  • 请教 MongoDB 结构问题 at April 30, 2012

    公司,部门,员工三个 Model,has_many 关系。

  • rails 如何做动态限时下载链接呢? at April 30, 2012

    #3 楼 @anylei http://apidock.com/rails/ActionController/Streaming/send_file 现在应该会自动用 X-sendfile 了,由静态服务器处理文件发送。我还没试过

  • rails ajax 问题请教 at April 29, 2012

    LZ 需要了解 respond_to 这个 api 和 :json format 的关系。

    http://apidock.com/rails/ActionController/MimeResponds/respond_to

    额外要做的是在布局里面的 head 部分加上<%= csrf_meta_tags %>,还有 jquery_ujs.js,用来给每个 ajx 请求加上防跨域攻击的 token。

    Rails 跟传统的 js 方式结合很好,其实它本身就是很标准的。

  • (转槽帖) Dear Python, Why Are You So Ugly? at April 29, 2012

    octopress 可以做反面例子

  • 表单与 mass-assign 的矛盾怎么解决比较优雅 at April 28, 2012

    http://apidock.com/rails/ActiveRecord/Persistence/update_attributes

    现在有 without_protection 这个参数了

    再配合 params[:xxx].slice(...) 来用

  • Rails 3.2 的 Ajax 向导 at April 28, 2012

    #9 楼 @huacnlee 不换头像不舒服斯基

  • Rails 3.2 的 Ajax 向导 at April 28, 2012

    #7 楼 @lb563 哪个?

  • 大家用 rails 操作 csv 文件多还是 excel 文件多些? at April 28, 2012

    joel,前 excel 开发经理,也是推荐用 csv,否则就装 windows 用 office 的 api

  • coder 球迷归属之问卷调查 at April 27, 2012

    小罗下坡路之后没有很喜欢的队了

  • 问个冷门点滴,重构那些事 at April 26, 2012

    :basic, :trade, :latest, :like, :gene

  • 毕业设计选题 at April 23, 2012

    #8 楼 @liwen_zhang 我打错字了,“毕业论文”检测

    收集已有的论文(不用多少,用来做样例就行了)做数据库,然后上传新论文,检测和已有论文的重合度。

    这个会激起民愤的东西~

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