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

[email protected]
深圳
184 Topics / 9141 Replies
728 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**

  • asciidoctor-htmlbook 31

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

  • material-ui 17

  • htmlrenderer 12

  • rich-text-editor 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 起码要一台 VPS,有什么低开销的方案? at April 05, 2014

    https://www.strikingly.com/ ?

  • ajax 问题 at April 04, 2014

    #15 楼 @wudixiaotie http://signalvnoise.com/posts/3697-server-generated-javascript-responses

  • css 文件在 pipeline 中的问题 at April 04, 2014

    这部分单独处理,不走 assets pipeline。

  • [新手] 关于 ModuleA::ClassA = ModuleA::ClassB 的问题 at April 03, 2014

    Ruby 里面大写开头的变量叫做常量,虽然叫做常量但是可以重复赋值,只是第二次赋值时解析器会输出警告。

    类名也是个常量,比如可以动态生成一个类然后赋值给常量

    A = Class.new do
      def bar
        "bar!"
      end
    end
    A.class
    #=> Class
    A.name
    #=> "A"
    A.new.bar
    #=> "bar!"
    

    跟下面几乎等价(我没研究过区别):

    class A
      def bar
        "bar!"
      end
    end
    
  • [新手] 关于 ModuleA::ClassA = ModuleA::ClassB 的问题 at April 03, 2014
    1. 问题是什么?
    2. 什么项目?
  • 有没有对本科生的一些建议? at April 02, 2014

    练习写文章,语句要通畅。

  • 将 HTML 保存到数据库,怎样让页面显示不显示代码,而显示效果 at April 02, 2014

    又来了,《别用 raw 和 html_safe》http://ruby-china.org/topics/16633

  • [北京] 触控科技有限公司招聘 Ruby 服务器开发人员 1 名 at March 31, 2014

    楼主连发 3 贴,觉得合适吗?

  • bundle 报错,大神们求救, at March 31, 2014

    翻墙看看。

  • 做 MySQL 的查询缓存,或者 Model 方法的缓存,有什么好方法? at March 31, 2014

    #3 楼 @ihlayy 没场景讨论不了。应该先把这里看一次 http://guides.rubyonrails.org/caching_with_rails.html

  • 做 MySQL 的查询缓存,或者 Model 方法的缓存,有什么好方法? at March 31, 2014

    要给出场景才知道要用什么缓存机制啊。

    如果是缓存一个查询

    def something_need_to_cache
      Rails.cache.fetch('some_key') do
        where(CONDITIONS).to_a
      end
    end
    
  • slim 应该怎么写这句<input id="fileupload" type="file" name="files []" data-url="<%= manage_images_path %>" multiple /> at March 31, 2014

    http://html2slim.herokuapp.com/

    input#fileupload data-url=manage_images_path multiple="" name="files[]" type="file"
    
  • Linode vs DigitalOcean 稳定性对比 at March 30, 2014

    #6 楼 @moliliang 这是谈主机稳定性还是中国特色的网络稳定性?如果是后者那没个准的。

  • 如果让你推荐 “离开就不能活” 的工具,你会说……?(主要 Mac 下,其他平台也可推荐) at March 29, 2014

    vpn

  • 请教一个关于 link_to 的问题 。 at March 29, 2014

    #4 楼 @monsoon 试过了就回不去了

  • 请教一个关于 link_to 的问题 。 at March 29, 2014

    这段 js 是放在什么位置执行的,估计跟 turbolinks 有关。

  • 更新一下侧边栏 CNode 图片吧 at March 29, 2014

    搞掂。

  • 请教如何对验证的错误提示信息,进行本地化 at March 29, 2014

    http://guides.rubyonrails.org/i18n.html#active-model-methods

    ActiveModel::Errors#full_messages prepends the attribute name to the error message using a separator that will be looked up from errors.format (and which defaults to "%{attribute} %{message}").

  • 请教如何对验证的错误提示信息,进行本地化 at March 29, 2014

    你如果要输出 model 的校验信息,应该用 model.errors.full_messages 来取得,里面已经指定了对应词条和属性名字。

  • 请教如何对验证的错误提示信息,进行本地化 at March 29, 2014

    我觉得你误解了 t 的用法,t 'errors.template.header' 的意思是找到 'errors.template.header' 这个词条,后面的参数是作为变量传到词条字符串里的。在顶楼信息中 'errors.template.header' 并不是一个词条,或者 t 有什么高级用法我不知道。

  • 请教如何对验证的错误提示信息,进行本地化 at March 29, 2014

    'errors.template.header' 这个词条没出现在你贴的 yml 文件里啊。

  • render 怎么传递参数? 怎样重新刷新一小部分页面? at March 28, 2014

    #12 楼 @chairy11 用 json,写客户端 js。

  • 支付宝 API 向导 (Ruby 版),以及开源一个支付宝 gem at March 28, 2014

    #43 楼 @huangling02 企业号或个人号都行,个人号限制多。需要有线上的网站提交审核。

  • 部分 fixtures 加载到制定的测试库 (项目有两个数据库) at March 28, 2014

    很少人会回答这个问题:

    1. 测试环境很少使用两个库
    2. 很少使用 fixtures
  • render 怎么传递参数? 怎样重新刷新一小部分页面? at March 27, 2014

    我这篇讲 UJS 的博客还能用

    http://chloerei.com/2012/04/21/rails-3-2-ajax-guide/

  • render 怎么传递参数? 怎样重新刷新一小部分页面? at March 27, 2014

    #6 楼 @chairy11 就是 4 楼方法。

    提问三件套:

    1. 代码
    2. 日志
    3. 调试
  • 基于 ruby on rails 做一个站内搜索 (不基于谷歌百度的站内搜索) at March 27, 2014

    https://github.com/elasticsearch/elasticsearch-rails

  • render 怎么传递参数? 怎样重新刷新一小部分页面? at March 27, 2014
    <%= render 'follow_icon', product: product %>
    
    <%= render partial: 'follow_icon', locals: { product: product } %>
    
  • Prev
  • 1
  • 2
  • …
  • 138
  • 139
  • 140
  • 141
  • 142
  • …
  • 273
  • 274
  • Next
关于 / RubyConf / Ruby 镜像 / RubyGems 镜像 / 活跃会员 / 组织 / API / 贡献者
由众多爱好者共同维护的 Ruby 中文社区,本站使用 Homeland 构建,并采用 Docker 部署。
服务器由 赞助 CDN 由 赞助
iOS 客户端 / Android 客户端 简体中文 / English