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

[email protected]
深圳
182 Topics / 9132 Replies
727 Followers
0 Following
11 Favorites
中下水平 Rails 程序员
Reward
GitHub Public Repos
  • writings 940

    [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**

  • 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

  • rails-app 7

    A Rails project template lets me start new projects quickly.

More on GitHub
  • Overview
  • Topics
  • Replies
  • Favorites
  • Following
  • Followers
  • Rails 可以实现页面自定义大小? at November 17, 2014

    这个跟 Rails 关系不大(跟 ASP 关系也不大),而是属于 HTML/CSS/JavaScript 范围。

    HTML 有 frame 标签,由浏览器原生支持拖拽,不过现在很少用。

    细致的效果要由 Js 实现,我没写过同类功能,搜了一下有这个库:

    http://interactjs.io/

  • Rails 可以实现页面自定义大小? at November 17, 2014

    看不懂,最好画个交互示例,用实际名称替代 ABC。

  • ruby 有没有象 python 的 scrapy 那样的爬虫框架 at November 17, 2014

    http://lmgtfy.com/?q=ruby+scrapy

  • 求教跨域访问策略在 development 模式下和 production 模式下的区别? at November 15, 2014

    #3 楼 @kikyous 正经分类话题别排队列。

  • 请教代码重构 at November 14, 2014
    if @msg.save && process_one && process_two && process_three
      flash[:notice] = '图文消息创建成功'
    else
      flash[:notice] = '图文消息创建失败'
    end
    
    private
    
    def process_one
    end
    
    def process_two
    end
    
    def process_three
    end
    
  • remote form 背后做了什么 at November 14, 2014

    #4 楼 @zhangsm 点进这个页面,绑定一次,出去,进来,绑定三次,出去进来出去……,绑定次数不等。

  • remote form 背后做了什么 at November 14, 2014
    1. application.js 里面有 jquery_ujs,负责处理 remote form。
    2. turbolinks 把网站变成单页应用,每次换页只替换 body 不替换 head,js 运行空间变成持久的。
    3. 把 application.js 放到 body,结果在每次换页都执行了一次,jquery_ujs 里面的事件就被重复绑定。

    把 application.js 放到 head 不是临时方案,而是正确方案。

  • What Ruby could do? at November 13, 2014

    opal 本来我觉得没什么用,直到我看到 https://github.com/asciidoctor/asciidoctor.js

  • 把密码文件 push 到远程了,咋办:( at November 12, 2014

    https://help.github.com/articles/remove-sensitive-data/

  • Ruby 如何用 for 循环打印一个三角形? at November 11, 2014

    #7 楼 @libuchao 没有用到 for 循环。

  • Ruby 如何用 for 循环打印一个三角形? at November 11, 2014

    #4 楼 @luikore 还是你的简洁……

  • Ruby 如何用 for 循环打印一个三角形? at November 11, 2014
    triangle = <<EOF
    *
    * *
    *   *
    * * * *
    EOF
    
    for line in triangle.lines
      puts line
    end
    
  • Ruby China 的流量有没有达到百万级? at November 11, 2014

    楼主你看,我可以用这个马甲给你回复

  • 求助!一个很基础的关于 link_to 的问题 at November 11, 2014

    #3 楼 @joke1943 我不用 IDE,要推荐就是 https://www.jetbrains.com/ruby/ 了。

    我现在用 https://atom.io/ 编辑器。

  • 为什么说 Raptor 比 Unicorn 快 4 倍,比 Puma 快 2 倍 at November 11, 2014

    看到后半看不懂了,等 Passenger 的大大发文分析。

  • 求助!一个很基础的关于 link_to 的问题 at November 11, 2014
    <h1>请假记录</h1>
    <%= link_to 'New note’, new_notes_path %><!--这里出错,找不到原因,求助!-->
    
    <table>
      <tr>
        <th>请假人</th>
        <th>时间</th>
      </tr>
    
      <% @notes.each do |note| %>
        <tr>
          <td><%= note.name %></td>
          <td><%= note.time %></td>
          <td><%= link_to 'Show', note_path(note) %></td>
        </tr>
      <% end %>
    </table>
    

    如果楼主好好排版就能发现问题了。

  • AngularJS 2.0 正在路上.. at November 10, 2014

    #9 楼 @lawrence 所有技术都是程序员的玩具,顺便用来解决生产问题。

  • Is Rails Slow? by Akira Matsuda at November 10, 2014

    #20 楼 @realwol 如果详细比较,就会发现这些比较对象不是一个层面的东西,越往上,开发者要做的东西就越多,例如 http 头都要自己设置,而越往下内置的功能越多,例如 session、路由、跨站预防…… hello world 跑分不是衡量工具选择的唯一标准。

    不过这个测试还是挺有用的,至少是一个参考因素。

  • Is Rails Slow? by Akira Matsuda at November 10, 2014

    #26 楼 @sickate 看来需要考古了,我本来以此为共识发这个话题的:

    https://ruby-china.org/topics/9825 https://ruby-china.org/topics/9853

  • AngularJS 2.0 正在路上.. at November 09, 2014

    Angular 2 的模板类似这样:

    <input type="text" [value]="firstName">
    <button (click)="addPerson()">Add</button>
    

    polymer 的模板(其实就是 HTML 标记)类似这样:

    <my-counter counter="10">Points</my-counter>
    

    不过实际上模板是隐藏在内部,类似一般的模板:

    <template>
      <style> /*...*/ </style>
      <div id="label"><content></content></div>
      Value: <span id="counterVal">{{counter}}</span><br>
      <button on-tap="{{increment}}">Increment</button>
    </template>
    

    同样基于 Components,不见得要用 Angular。

  • AngularJS 2.0 正在路上.. at November 09, 2014

    #6 楼 @lawrence 没用上,以前读过 angular 和 ember 还有 backbone 的文档,觉得这种开发方法都不是很适合我,所以还是默认的 Rails Stack。现在庆幸没用 angular,也可以从选项中除名了。

  • 定义 class 的时候,前面加上:: 是什么意思? at November 09, 2014

    :: 是从顶层开始查找,如果没有 :: 就从当前域查找。需不需要 :: 取决于当前域有没有同名常量。

  • Is Rails Slow? by Akira Matsuda at November 09, 2014

    #17 楼 @realwol http://www.techempower.com/benchmarks/

  • AngularJS 2.0 正在路上.. at November 09, 2014

    1.3 用户被无情抛弃,还跟着上 2.0 就是真爱。

  • Is Rails Slow? by Akira Matsuda at November 09, 2014

    #15 楼 @realwol 那么标题就要换 Is Ruby Slow? 了

  • 为什么要使用 FactoryGirl? at November 07, 2014

    我不懂怎么设置一个满足所有测试需求的 Fixture 数据集,FactoryGirl 可以在每个 test case 中独立。

  • 建议 ruby-china 添加站内搜索功能 at November 07, 2014

    #19 楼 @huobazi #20 楼 @lgn21st

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