Ruby China
  • 社区
  • 招聘
  • Wiki
  • 酷站
  • Gems
  • 注册
  • 登录
@wuwx
高级会员
第 2963 位会员 / 2012-07-20

沈阳
39 篇帖子 / 224 条回帖
3 关注者
0 正在关注
5 收藏
GitHub Public Repos
  • laravel-hashing-md5 7

    为 Laravel 添加 MD5 Hasher

  • laravel-socialite-neupass 5

  • laravel-hashing-sm3 3

  • laravel-plus-view 3

  • laravel-expression-lan... 2

  • BOSL2 0

    The Belfry OpenScad Library, v2.0. An OpenSCAD library of shapes, masks, and manipulators to mak...

  • NopSCADlib 0

    Library of parts modelled in OpenSCAD and a framework for making projects

  • dify 0

    Dify is an open-source LLM app development platform. Dify's intuitive interface combines AI workf...

  • mediamtx 0

    Ready-to-use SRT / WebRTC / RTSP / RTMP / LL-HLS media server and media proxy that allows to read...

  • registry-index 0

    Registry index for buildpacks.io

More on GitHub
  • 概况
  • 话题
  • 回帖
  • 收藏
  • 正在关注
  • 关注者
  • 求 rubymine 用户来介绍 at 2013年02月01日

    一直使用 TextMate 的飘过

  • gitlab 188 个 gem 震撼 at 2013年02月01日

    还真没关注过项目依赖的数量,不过看了下自己写的东西,随便个项目,飙升到几十个好像很容易

  • 抛出一个 Rails 插件化开发的重要且有趣的问题 at 2013年01月20日

    discuz 的插件一开就是全站开的,不是针对某用户的呀 :)

  • 请问 Rails 3.2.11 中 fresh_when 的用法 at 2013年01月11日

    最后把控制器改成这样了:

    def index
      @topics = Topic.includes(:user).page(params[:page]).reverse_order.all
      fresh_when(:etag => [@topics])
    end
    
  • 请问 Rails 3.2.11 中 fresh_when 的用法 at 2013年01月11日

    #8 楼 @huacnlee 果然好使了,厉害

  • 请问 Rails 3.2.11 中 fresh_when 的用法 at 2013年01月11日
    @topics = Topic.includes(:user).page(1).reverse_order
    Digest::MD5.hexdigest(@topics)
    

    报告错误:TypeError: can't convert ActiveRecord::Relation into String

  • 请问 Rails 3.2.11 中 fresh_when 的用法 at 2013年01月11日

    #1 楼 @huacnlee log 来了

    Started GET "/topics" for 127.0.0.1 at 2013-01-11 15:07:51 +0800
    Processing by TopicsController#index as HTML
      User Load (0.2ms)  SELECT "users".* FROM "users" WHERE "users"."id" = 1 LIMIT 1
      Rendered topics/_form.html.erb (3.7ms)
      Topic Load (0.1ms)  SELECT "topics".* FROM "topics" ORDER BY "topics"."id" DESC LIMIT 30 OFFSET 0
      User Load (0.2ms)  SELECT "users".* FROM "users" WHERE "users"."id" IN (1)
       (0.1ms)  SELECT COUNT(*) FROM "comments" WHERE "comments"."topic_id" = 1
       (0.1ms)  SELECT COUNT(*) FROM "flowers" WHERE "flowers"."topic_id" = 1
      Rendered topics/_topic.html.erb (4.3ms)
      Rendered topics/index.html.erb within layouts/topics (11.9ms)
      User Load (0.2ms)  SELECT "users".* FROM "users" LIMIT 10
      Rendered users/_user.html.erb (1.0ms)
      Rendered layouts/application.html.erb (3.7ms)
    Completed 200 OK in 22ms (Views: 19.8ms | ActiveRecord: 1.0ms)
    
    
    Started GET "/assets/application.css" for 127.0.0.1 at 2013-01-11 15:07:51 +0800
    Served asset /application.css - 304 Not Modified (4ms)
    
    
    Started GET "/assets/application.js" for 127.0.0.1 at 2013-01-11 15:07:51 +0800
    Served asset /application.js - 304 Not Modified (2ms)
    
    
    Started GET "/topics" for 127.0.0.1 at 2013-01-11 15:07:52 +0800
    Processing by TopicsController#index as HTML
      User Load (0.2ms)  SELECT "users".* FROM "users" WHERE "users"."id" = 1 LIMIT 1
      Rendered topics/_form.html.erb (3.8ms)
      Topic Load (0.2ms)  SELECT "topics".* FROM "topics" ORDER BY "topics"."id" DESC LIMIT 30 OFFSET 0
      User Load (0.2ms)  SELECT "users".* FROM "users" WHERE "users"."id" IN (1)
       (0.1ms)  SELECT COUNT(*) FROM "comments" WHERE "comments"."topic_id" = 1
       (0.1ms)  SELECT COUNT(*) FROM "flowers" WHERE "flowers"."topic_id" = 1
      Rendered topics/_topic.html.erb (4.5ms)
      Rendered topics/index.html.erb within layouts/topics (12.3ms)
      User Load (0.1ms)  SELECT "users".* FROM "users" LIMIT 10
      Rendered users/_user.html.erb (1.1ms)
      Rendered layouts/application.html.erb (3.0ms)
    Completed 200 OK in 22ms (Views: 19.6ms | ActiveRecord: 1.0ms)
    
    
    Started GET "/assets/application.css" for 127.0.0.1 at 2013-01-11 15:07:52 +0800
    Served asset /application.css - 304 Not Modified (4ms)
    
    
    Started GET "/assets/application.js" for 127.0.0.1 at 2013-01-11 15:07:52 +0800
    Served asset /application.js - 304 Not Modified (2ms)
    
    
    
  • 请问 Rails 3.2.11 中 fresh_when 的用法 at 2013年01月11日

    #1 楼 @huacnlee 木有覆盖哇,没有重写过这个方法…… 不过发现一个问题,如果是单个对象就可以返回 304,列表就不行

  • 应该如何获得整个项目中所有 ActiveRecord::Base 模型的名称 at 2013年01月08日

    #5 楼 @yanhao 感谢感谢

  • 用户管理架构设计 at 2013年01月08日

    #6 楼 @woaigithub 呵呵,呵呵,理解,理解

  • 应该如何获得整个项目中所有 ActiveRecord::Base 模型的名称 at 2013年01月08日

    #1 楼 @fsword #2 楼 @quakewang

    Model 没有被调用之前不显示……

  • 用户管理架构设计 at 2013年01月08日

    个人建议把全文全贴出来就可以了,没必要非让人到你的 BLOG 上看……

  • Rails 使用 mysql 出现问题 at 2012年12月18日

    #7 楼 @xautjzd 有关 js 几个可选运行环境的问题我就没有关注过了……

  • Rails 使用 mysql 出现问题 at 2012年12月17日

    yum install mysql-devel

  • 询问一个有关模型的验证问题 at 2012年12月17日

    #5 楼 @Teddy 恩,用 js 验证确实是个不错的好想法哟

  • 询问一个有关模型的验证问题 at 2012年12月17日

    #3 楼 @geekontheway 管理员登陆后也有可能在前台修改用户的账户呀

    #2 楼 @jjym 后台更新用户信息的时候,邮件地址是可选输入,这个 user.email 有可能是空的

    #1 楼 @iBachue 模型字段特别多,所以希望在后台输入的时候能少输入一些

  • 好玩又可怕的现实 at 2012年12月09日

    分析的挺牛 B。。。。。。

  • 如何让 devise 产生的登陆的风格也能应用 twitter-bootstrarp 的风格呢? at 2012年12月02日

    #6 楼 @ericguo 非常感谢

  • 如何让 devise 产生的登陆的风格也能应用 twitter-bootstrarp 的风格呢? at 2012年12月02日

    更简便的办法就是看看有没有谁写好的现成的 gem 或者 view 了:) 我也很期待很简单的办法……

  • 如何让 devise 产生的登陆的风格也能应用 twitter-bootstrarp 的风格呢? at 2012年12月02日

    rails g devise:view

    然后嗷嗷改 HTML

  • RubyConfChina 2012 新浪 SAE Ruby 平台激活码和七牛云存储现金券 at 2012年11月26日

    我悲催了,手贱,没看清文档,在新建应用的时候把邀请码输入到“输入邀请码,抢先体验 Python、Java 语言”的框里了,结果 vmc 就无法 login 了……

  • RubyConfChina 2012 新浪 SAE Ruby 平台激活码和七牛云存储现金券 at 2012年11月25日

    wuweixin#gmail.com thanks :)

  • 关于后台进程自动 kill at 2012年11月17日

    程序执行出错了于是就退了,我是这么理解的 @元芳 你怎么看?

  • ruby 如何实现这个 aop 效果? at 2012年11月12日

    看这个包的命名应该是代理模式 用 C++ 都可以实现这种模式……

  • 比较 Ruby on Rails 和 CakePHP at 2012年11月09日

    CakePHP 照 RubyOnRails 有很大的差距的…… 如果说早期版本的 CakePHP 和早期版本的 RoR 各有优劣的话 最新版本的 CakePHP 就被 最新版本的 RoR 远远地抛在后面了 用用你就知道了,他们的差距不是一点半点 这也是 Ruby 这类语言的优势,如果需求不停地变的话,他的重构优势非常大

  • Rails 限制失败次数这个功能怎么做? at 2012年11月05日

    扔到一个 key-value cache 里去做统计 则可以实现 IP,IP 段,用户名等等的匹配

  • Rails console 下, model 中 inspect 出的数据乱码 at 2012年10月22日

    检查检查你的 database.yml 以及 mysql 数据库的 encoding ?

  • 如何实现自定义字段 at 2012年10月17日

    大概方法:一个字段表,一个值表,允许用户在字段表里增加字段所属模型,字段类型,字段名称等等参数 然后用户在新建该模型的时候,就可以录入属于这个模型的字段了

  • 如何实现自定义字段 at 2012年10月17日

    不如直接允许自定义字段,而不是预留:)

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