Ruby China
  • 社区
  • 招聘
  • Wiki
  • 酷站
  • Gems
  • 注册
  • 登录
@cqpx
高级会员
第 40 位会员 / 2011-11-06

43 篇帖子 / 362 条回帖
0 关注者
0 正在关注
24 收藏
未设置 GitHub 信息。
  • 概况
  • 话题
  • 回帖
  • 收藏
  • 正在关注
  • 关注者
  • mongoid 的 accepts_nested_attributes_for 怎么用 at 2012年01月16日

    关于“小问题”http://mongoid.org/docs/relations.html embeds_many 是 Embedded relations has_many 是 Referenced relations

    Embedded relations are associations between one or many objects where the child object is embedded within the parent in the same document in the database. They can be extremely efficient when kept to a managable size in MongoDB since the total number of queries required to retrieve an entire object graph can be reduced to one.

    Referenced relations are associations between documents that reside in separate collections in MongoDB. The link between the documents is handled similar to a relational database where a "foreign key" needs to be stored on one or both sides of the relation, but note that accessing a referenced relation required a separate query to the database since joins cannot be performed.

  • 我试着建了一个这个。。结果就给建起来了。。https://github.com/ruby-china at 2012年01月15日

    @Rei @lgn21st @huacnlee

  • 关于帖子热度排行排序这样的操作 at 2012年01月15日

    可以参考这个讨论 http://ruby-china.org/topics/153#reply16

  • 申请编辑 http://ruby-china.org/wiki 的权限 at 2012年01月15日

    需要管理员权限。。原来如此。。

  • 求一个可以参考的梯形回复实例 at 2012年01月14日

    codecampo.com

  • sudo gem install rails 出错 at 2012年01月14日

    http://ruby-china.org/wiki/install_ruby_guide

  • 关于 ruby-china 收藏的一句代码! at 2012年01月14日

    #2 楼 @stephen activerecord 也有这个方法,叫 Dynamic attribute-based finders http://api.rubyonrails.org/classes/ActiveRecord/Base.html

    还是自己检查环境

  • 关于 ruby-china 收藏的一句代码! at 2012年01月14日

    这是 mongoid 的方法 http://mongoid.org/docs/querying/finders.html#find_or_create_by 找不到这个方法,又没有代码,只有你自己检查自己的环境配好了没有

  • 发现一个做纸质产品原型的小工具,帅! at 2012年01月13日

    抵制山寨货

  • 「.rails_generators~」是个什么文件? at 2012年01月13日

    没见到过...

  • 请问有没有专门做视频的 Gem? at 2012年01月13日

    #2 楼 @xufeng 之前存过这个,不过不是转 flv 的 https://github.com/devthenet/voyeur

    Voyeur is a ruby library that will take your video files and convert them to common HTML5 formats exposing an easy to use API. Seriously it's like falling out of a tree then climbing back.
    
  • 国内什么 rails 主机提供商么 at 2012年01月13日

    #8 楼 @javy_liu 主机列表http://ruby-china.org/wiki/rails_hosting

    heroku 我这里还勉强,也有朋友说很慢,看运气。你可以自己试试 http://decorators-in-rails.herokuapp.com/

  • Yupoo 的云存储 at 2012年01月13日

    #6 楼 @huacnlee 看不到 div.info,应该是被 lock 了。其他页面都可以编辑

  • Yupoo 的云存储 at 2012年01月13日

    我本来想把 yupoo 加到http://ruby-china.org/wiki/rails_hosting 里,结果没找到编辑按钮。。 哪位大哥辛苦一下。。 还有 Slicehost 已经被 Rackspace 收购,可以删掉了。 载途网站都打不开了,也可以删掉。

    以后再有谁问主机的问题就可以把这个 wiki 丢给他了嘛..

  • 为什么你们用 Vim 和 Textmate 而不用 IDE at 2012年01月13日

    #7 楼 @quakewang sublime text 2 更新,支持 auto complete,还没转朋友的快转啊,呵呵呵 http://www.sublimetext.com/blog/articles/sublime-text-2-build-2165

  • v2ex 在讨论 topic 和 node 的关系,Livid 有一个 topic 多个 node 想法 at 2012年01月13日

    这种情况我们通常叫做给 topic 加 tag... 看他的解释,翻译过来就是”技术上不好实现“。而且是 10 个月前的讨论了。。 ruby-china 要实现这个还是很容易的,@Rei在自己的论坛系统里就已经实现过,http://codecampo.com 就用的 tag。 其实这个问题在早期的时候就有讨论过 (http://ruby-china.org/topics/48 ),现在看来节点和 tag 都不是必须的,因为论坛流量并不大

  • 问个关于 dependent 和 through 的问题 at 2012年01月12日

    http://guides.rubyonrails.org/association_basics.html#the-has_many-through-association

  • 关于 push 提醒功能 at 2012年01月12日

    看看 mention 和 topic 的代码,model 部分有 after_save

  • 有没有完美一点的方法来 parse url?URI.extract 遇到冒号就傻了 at 2012年01月10日

    #1 楼 @lgn21st 多谢大哥指点,找到了满意的方案 具体来讲就是用https://github.com/twitter/twitter-text-rb/blob/master/lib/regex.rb里面的Twitter::Regex::REGEXEN[:valid_url]

  • 建议增加 puppet 节点 at 2012年01月10日

    请问有 puppet 搭建 rails 环境的教程推荐吗?

  • 原来 ruby-china 也可以按 m 键了查看 markdown 语法了 at 2012年01月10日

    我这里也有这个问题

  • rails application 在 server 上的部署? at 2012年01月09日

    是。 没有。

  • has_many,根据关联的数量排序! at 2012年01月09日

    我这个办法有没有问题?我以前就是这么用的。。

    Author.joins(:articles).select("count(articles.id) as article_count").group("authors.id").order("article_count")
    

    2 楼的办法还没见过。。一会儿研究一下

  • 请问网站要如何提供域名绑定的服务? at 2012年01月09日

    经大家提醒之后我发现,好像只要让客户改 CNAME,处理起来就和 subdomain 一样了,过段时间我试试 谢谢各位的回复

  • 这个 ruby-china 安装是缺少某个插件吗? at 2012年01月08日
    cd /home/user/oss/ruby_china/
    git add config/mongoid.yml
    git ci -am'add mongoid.yml'
    cap deploy
    
  • 这个 ruby-china 安装是缺少某个插件吗? at 2012年01月08日

    没加到 git 里?

  • 代码托管服务 GitCafe 正式上线 at 2012年01月03日

    #14 楼 @sihaiyunyou ruby-china 也是中国人所开发的最为伟大的 IT 项目之一,codecampo 也是中国人所开发的最为伟大的 IT 项目之一,v2ex 也是中国人所开发的最为伟大的 IT 项目之一

  • 修改节点的功能何时 release? at 2011年12月31日

    #6 楼 @hujoy tags 都不需要,我的意思是你会发现如果没有节点这个功能,使用起来和现在并没有什么不一样的感觉,不会觉得差了点儿什么

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