Ruby China
  • Topics
  • 招聘
  • Wiki
  • 酷站
  • Gems
  • Sign Up
  • Sign In
@kikyous
VIP
NO. 2564 / 2012-06-16

[email protected]
西安
88 Topics / 875 Replies
20 Followers
0 Following
13 Favorites
GitHub Public Repos
  • ChatGPT-Nuxt-Web 10

  • bootstrap3-sass 4

    bootstrap-sass 3 continue

  • vscode-css-action 3

    A vscode extension help editing scss/less file with color replace and px convert.

  • mitmfile.py 2

    Define and load mitmproxy config easy

  • easy_form 2

    form builder without complex dsl

  • tc-dev-enhance 1

  • vue3-ui-test 0

  • Clash.Meta 0

    A rule-based tunnel in Go.

  • inertia-rails 0

    The Rails adapter for Inertia.js.

  • deno_deploy_cors_proxy 0

    Deno Deploy CORS Proxy

More on GitHub
  • Overview
  • Topics
  • Replies
  • Favorites
  • Following
  • Followers
  • 用 vim 的怎么在模板中方便的输入 <%= %> 等 at June 29, 2012

    #2 楼 @eddie 嗯,看看

  • 分享一个好看的配色,支持非常多的编辑器 at June 29, 2012

    预览

  • rails 怎么用关联的表里面的字段排序? at June 26, 2012
    @categ.each_with_index do |e,i|
      if i != 0
        @videos << Video.includes(:videodatum).where(:cid => e).order('lastdate DESC').limit(5)
        # @tops << Video.joins('LEFT OUTER JOIN videodata ON videodata.video_id = videos.id').where(:cid => e).order('hits DESC').limit(10)
        @tops << Video.includes(:videodatum).where(:cid => e).order('videodata.hits DESC').limit(10)
    
      end
    end
    
  • rails 怎么用关联的表里面的字段排序? at June 26, 2012

    #10 楼 @Rei 嗯,现在好了

    Started GET "/" for 127.0.0.1 at 2012-06-26 20:32:19 +0800
    Processing by VideosController#index as HTML
      Categorgy Load (2.1ms)  SELECT `categorgies`.* FROM `categorgies` ORDER BY cup
      Rendered videos/_toolbar.html.erb (0.1ms)
      Video Load (5.8ms)  SELECT `videos`.* FROM `videos` WHERE `videos`.`cid` IN (5, 6, 7, 8, 9, 10, 11) ORDER BY lastdate DESC LIMIT 5
      Videodatum Load (1.6ms)  SELECT `videodata`.* FROM `videodata` WHERE `videodata`.`video_id` IN (1041, 1039, 1036, 1000, 1037)
      Video Load (4.8ms)  SELECT `videos`.* FROM `videos` WHERE `videos`.`cid` IN (13, 15, 16, 17, 37) ORDER BY lastdate DESC LIMIT 5
      Videodatum Load (1.8ms)  SELECT `videodata`.* FROM `videodata` WHERE `videodata`.`video_id` IN (1033, 941, 943, 942, 929)
      Video Load (6.7ms)  SELECT `videos`.* FROM `videos` WHERE `videos`.`cid` IN (32, 20, 30) ORDER BY lastdate DESC LIMIT 5
      Videodatum Load (1.5ms)  SELECT `videodata`.* FROM `videodata` WHERE `videodata`.`video_id` IN (776, 672, 947, 930, 866)
      Video Load (3.7ms)  SELECT `videos`.* FROM `videos` WHERE `videos`.`cid` IN (29, 33, 34) ORDER BY lastdate DESC LIMIT 5
      Videodatum Load (1.5ms)  SELECT `videodata`.* FROM `videodata` WHERE `videodata`.`video_id` IN (1040, 491, 925, 924, 923)
      SQL (34.0ms)  SELECT `videos`.`id` AS t0_r0, `videos`.`cid` AS t0_r1, `videos`.`nid` AS t0_r2, `videos`.`author` AS t0_r3, `videos`.`authorid` AS t0_r4, `videos`.`postdate` AS t0_r5, `videos`.`lastdate` AS t0_r6, `videos`.`name` AS t0_r7, `videos`.`picfolder` AS t0_r8, `videos`.`pic` AS t0_r9, `videos`.`playactor` AS t0_r10, `videos`.`director` AS t0_r11, `videos`.`tag` AS t0_r12, `videos`.`year` AS t0_r13, `videos`.`description` AS t0_r14, `videos`.`best` AS t0_r15, `videos`.`serialise` AS t0_r16, `videos`.`memo` AS t0_r17, `videos`.`yz` AS t0_r18, `videodata`.`video_id` AS t1_r0, `videodata`.`hits` AS t1_r1, `videodata`.`reply` AS t1_r2, `videodata`.`sale` AS t1_r3, `videodata`.`need` AS t1_r4, `videodata`.`usernth` AS t1_r5, `videodata`.`fraction` AS t1_r6, `videodata`.`star` AS t1_r7 FROM `videos` LEFT OUTER JOIN `videodata` ON `videodata`.`video_id` = `videos`.`id` WHERE `videos`.`cid` IN (5, 6, 7, 8, 9, 10, 11) ORDER BY videodata.hits DESC LIMIT 10
      SQL (11.6ms)  SELECT `videos`.`id` AS t0_r0, `videos`.`cid` AS t0_r1, `videos`.`nid` AS t0_r2, `videos`.`author` AS t0_r3, `videos`.`authorid` AS t0_r4, `videos`.`postdate` AS t0_r5, `videos`.`lastdate` AS t0_r6, `videos`.`name` AS t0_r7, `videos`.`picfolder` AS t0_r8, `videos`.`pic` AS t0_r9, `videos`.`playactor` AS t0_r10, `videos`.`director` AS t0_r11, `videos`.`tag` AS t0_r12, `videos`.`year` AS t0_r13, `videos`.`description` AS t0_r14, `videos`.`best` AS t0_r15, `videos`.`serialise` AS t0_r16, `videos`.`memo` AS t0_r17, `videos`.`yz` AS t0_r18, `videodata`.`video_id` AS t1_r0, `videodata`.`hits` AS t1_r1, `videodata`.`reply` AS t1_r2, `videodata`.`sale` AS t1_r3, `videodata`.`need` AS t1_r4, `videodata`.`usernth` AS t1_r5, `videodata`.`fraction` AS t1_r6, `videodata`.`star` AS t1_r7 FROM `videos` LEFT OUTER JOIN `videodata` ON `videodata`.`video_id` = `videos`.`id` WHERE `videos`.`cid` IN (13, 15, 16, 17, 37) ORDER BY videodata.hits DESC LIMIT 10
      SQL (16.7ms)  SELECT `videos`.`id` AS t0_r0, `videos`.`cid` AS t0_r1, `videos`.`nid` AS t0_r2, `videos`.`author` AS t0_r3, `videos`.`authorid` AS t0_r4, `videos`.`postdate` AS t0_r5, `videos`.`lastdate` AS t0_r6, `videos`.`name` AS t0_r7, `videos`.`picfolder` AS t0_r8, `videos`.`pic` AS t0_r9, `videos`.`playactor` AS t0_r10, `videos`.`director` AS t0_r11, `videos`.`tag` AS t0_r12, `videos`.`year` AS t0_r13, `videos`.`description` AS t0_r14, `videos`.`best` AS t0_r15, `videos`.`serialise` AS t0_r16, `videos`.`memo` AS t0_r17, `videos`.`yz` AS t0_r18, `videodata`.`video_id` AS t1_r0, `videodata`.`hits` AS t1_r1, `videodata`.`reply` AS t1_r2, `videodata`.`sale` AS t1_r3, `videodata`.`need` AS t1_r4, `videodata`.`usernth` AS t1_r5, `videodata`.`fraction` AS t1_r6, `videodata`.`star` AS t1_r7 FROM `videos` LEFT OUTER JOIN `videodata` ON `videodata`.`video_id` = `videos`.`id` WHERE `videos`.`cid` IN (32, 20, 30) ORDER BY videodata.hits DESC LIMIT 10
      SQL (15.6ms)  SELECT `videos`.`id` AS t0_r0, `videos`.`cid` AS t0_r1, `videos`.`nid` AS t0_r2, `videos`.`author` AS t0_r3, `videos`.`authorid` AS t0_r4, `videos`.`postdate` AS t0_r5, `videos`.`lastdate` AS t0_r6, `videos`.`name` AS t0_r7, `videos`.`picfolder` AS t0_r8, `videos`.`pic` AS t0_r9, `videos`.`playactor` AS t0_r10, `videos`.`director` AS t0_r11, `videos`.`tag` AS t0_r12, `videos`.`year` AS t0_r13, `videos`.`description` AS t0_r14, `videos`.`best` AS t0_r15, `videos`.`serialise` AS t0_r16, `videos`.`memo` AS t0_r17, `videos`.`yz` AS t0_r18, `videodata`.`video_id` AS t1_r0, `videodata`.`hits` AS t1_r1, `videodata`.`reply` AS t1_r2, `videodata`.`sale` AS t1_r3, `videodata`.`need` AS t1_r4, `videodata`.`usernth` AS t1_r5, `videodata`.`fraction` AS t1_r6, `videodata`.`star` AS t1_r7 FROM `videos` LEFT OUTER JOIN `videodata` ON `videodata`.`video_id` = `videos`.`id` WHERE `videos`.`cid` IN (29, 33, 34) ORDER BY videodata.hits DESC LIMIT 10
      Rendered videos/_sidebar.html.erb (119.0ms)
      Rendered videos/index.html.erb within layouts/application (410.0ms)
    Completed 200 OK in 532ms (Views: 286.4ms | ActiveRecord: 154.0ms)
    [2012-06-26 20:32:20] WARN  Could not determine content-length of response body. Set content-length of the response or set Response#chunked = true
    
  • rails 怎么用关联的表里面的字段排序? at June 26, 2012

    #7 楼 @Rei 我看了一下,返回的数据现在是正常的,但是不知道为什么不用 id

  • rails 怎么用关联的表里面的字段排序? at June 26, 2012

    #7 楼 @Rei undefined method `id' for #ActiveRecord::Relation:0xb66472f4

  • rails 怎么用关联的表里面的字段排序? at June 26, 2012

    救命啊

  • 各位 linux 下的 gvim 字体用的是啥? at June 26, 2012

    monaco

  • rails 怎么用关联的表里面的字段排序? at June 26, 2012

    #3 楼 @Rei undefined method `id' for #ActiveRecord::Relation:0xb66472f4

  • rails 怎么用关联的表里面的字段排序? at June 26, 2012

    #3 楼 @Rei 没有 videodata.hits 这个字段

  • rails 怎么用关联的表里面的字段排序? at June 26, 2012

    #1 楼 @Rei 他的复数是 videodata

  • application_controller.rb 这个控制器的作用? at June 26, 2012

    @ywencn

    class ApplicationController < ActionController::Base
      protect_from_forgery
      def self.get_categ
         ...
         categ
      end
    
    
    @@categ=self.get_categ if not defined?@@categ
    end
    

    @@categ 是数组

    然后我在其他控制器里使用@@categ,为什么只有第一次访问的时候正常,再访问是@@categ 就为空数组了

  • application_controller.rb 这个控制器的作用? at June 26, 2012

    哦,其他控制器都是继承的这个控制器

  • vim 的大神们,你们喜欢 tab 还是 buffer at June 25, 2012

    #20 楼 @camel 试了一下,很不错

  • 说说我的开发工具 Sublime Text 2 和对 Vim 的研究 at June 25, 2012

    #45 楼 @ery 不知道是大一还是大二开始用的,现在因该有两年了

  • vim 的大神们,你们喜欢 tab 还是 buffer at June 24, 2012

    #8 楼 @camel command-T

  • 说说我的开发工具 Sublime Text 2 和对 Vim 的研究 at June 24, 2012

    用了一段时间 sublime text 2,感觉很多地方还是没有 vim 用着顺手,现在不用他了

  • [冲动欲望] Windows 本本用的火大死了,明天去买 MBA 了 快点阻止我 >.< at June 23, 2012

    用 linux 才有感觉,free 的感觉

  • 怎么用 rails 实现这样的查询? at June 23, 2012

    #1 楼 @veggie 感谢,试试

  • 用 sublimetext 的同志们想过没? at June 23, 2012

    难道因为这个原因你不想出生在中国吗

  • 想改写一个 php 视频网站作为练手,求经验求指导 at June 22, 2012

    是要改数据库吗?

  • rails 的模板系统比较复杂,有没有输入模板代码可以立马看到 html 代码的方法? at June 22, 2012

    #4 楼 @gaicitadie 嘿嘿

  • 使用 vim 的大神们,开发 rails,一般用什么代码片段、代码补全插件? at June 22, 2012

    rails.vim zencoding.vim command-T

  • rails 的模板系统比较复杂,有没有输入模板代码可以立马看到 html 代码的方法? at June 22, 2012

    #2 楼 @hooopo 嗯,试试

  • 请教一个 rails 中翻译的问题 at June 22, 2012

    就是 关系吧

  • [杭州] 爱图购 聘 攻城湿 设计狮~~~~ at June 21, 2012

    看起了要求很高

  • 菜鸟求助:初学者需要把代码都弄清楚吗? at June 21, 2012

    学了几天了,现在也是迷茫中

  • 最近好像坛子里有点火气太旺 at June 20, 2012

    没事

  • 我终于还是被 Debian 给击败了。 at June 20, 2012

    ubuntu 12.04 gnome3

  • rails 路由的问题 at June 19, 2012

    #3 楼 @yggg 恩,学习了

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