Ruby China
  • 社区
  • 招聘
  • Wiki
  • 酷站
  • Gems
  • 注册
  • 登录
Rei
@Rei
管理员
第 1 位会员 / 2011-10-28

[email protected]
深圳
188 篇帖子 / 9165 条回帖
731 关注者
0 正在关注
11 收藏
中下水平 Rails 程序员
打赏作者
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**

  • geeknote 34

  • 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

More on GitHub
  • 概况
  • 话题
  • 回帖
  • 收藏
  • 正在关注
  • 关注者
  • session 中的 flash 使用诡异问题 at 2013年03月29日

    #2 楼 @tiemei 输出结果是什么?在 view 里能输出吗?

  • session 中的 flash 使用诡异问题 at 2013年03月29日

    这颜色无法直视,看不清问题。

  • Turbolinks 向导 at 2013年03月29日

    #26 楼 @saiga 要贴代码和错误信息才行。

  • Turbolinks 向导 at 2013年03月29日

    #24 楼 @saiga 信息不足判断不了,按理说切换页面不会请求 head 里面的 assets,写在别的地方了?

  • Turbolinks 向导 at 2013年03月29日

    #22 楼 @aptx4869 可行。

    我更偏好分不同布局。writings.io 分了 3 个布局:公共页面、管理页面、编辑页面。

    非作者浏览文章的页面是公共页面,只有很少的 js。

    管理页面有文章列表一类的 js 逻辑。

    编辑页面载入编辑器。

    这三类页面之间不通过 PJAX 切换,如果有链接的话也会用 data-no-turbolink 打断。目前工作得很好。

  • Turbolinks 向导 at 2013年03月29日

    #19 楼 @chenge 这个我没用过额,有空看看。

  • Turbolinks 向导 at 2013年03月29日

    #18 楼 @aptx4869 官方文档有这么两段

    Turbolinks will evaluate any script tags in pages it visit, if those tags do not have a type or if the type is text/javascript. All other script tags will be ignored.

    As a rule of thumb when switching to Turbolinks, move all of your javascript tags inside the head and then work backwards, only moving javascript code back to the body if absolutely necessary.

    你的想法是可行的,官方推荐还是放到 head,我还没想清楚为什么。

  • Turbolinks 向导 at 2013年03月29日

    #16 楼 @jiang_plus 上图好了

    这要看数据量和程序复杂度。

  • writings.io - 提供在线文章写作、管理、发布的网站服务 at 2013年03月29日

    #85 楼 @xiaoronglv 晕,要不要我重置一个随机密码发到你邮箱?帐号是多少?

  • 额,尴尬…… at 2013年03月29日

    学 Ruby 还有前途吗?我刚来就看到这个,感觉心好凉啊。

  • Turbolinks 向导 at 2013年03月28日

    #12 楼 @huobazi 有计划,还没排到。

  • Turbolinks 向导 at 2013年03月28日

    #6 楼 @lilu

    做了个测试

    > var foo = 'bar'
    undefined
    > window.foo
    "bar"
    > document.foo
    undefined
    
  • Turbolinks 向导 at 2013年03月28日

    #2 楼 @linjunpop 是 one,只执行一次。

  • 大家都是怎么做 Test 的 at 2013年03月28日

    测试自己觉得容易错的地方和需要调试 2 次以上的地方

  • 程序员工资 at 2013年03月28日

    #66 楼 @jiang_plus #67 楼 @chairy11

    一个机枪兵加一个护士可以打两个机枪兵。

    而且还可以使用机枪兵的“兴奋剂”技能。

  • slim 引入 css at 2013年03月28日

    Rails 放 css 和 js 是在 app/assets 文件夹下的

    http://guides.rubyonrails.org/asset_pipeline.html

  • writings.io - 提供在线文章写作、管理、发布的网站服务 at 2013年03月27日

    图片上传功能上线 http://blog.chloerei.com/articles/57ca31fb

    #62 楼 @knwang 及早收费了。

  • ruby 有比较成熟的类 classifier4J 这样自动摘要的实现么 at 2013年03月27日

    #19 楼 @ywjno 要先进行中文分词

  • ruby 有比较成熟的类 classifier4J 这样自动摘要的实现么 at 2013年03月27日

    #13 楼 @iceskysl 我觉得粗暴方式挺好,如果效果不好,那其实是文章作者的开头没有做到简明额要。而且最重要的是标题。

  • ruby 有比较成熟的类 classifier4J 这样自动摘要的实现么 at 2013年03月27日

    #2 楼 @iceskysl 暂时不需要,如果有的话会试试。

    现在抽摘要用很简单粗暴的方法:抽取 p 标签内容裁剪 140 字。

  • ruby 有比较成熟的类 classifier4J 这样自动摘要的实现么 at 2013年03月27日

    最简单的,通过系统命令调别的语言实现的工具。

  • 有谁知道 Ruby 设计 Singleton methods 的原因 at 2013年03月27日

    #24 楼 @fleuria 哈哈,同一个坑里

  • 有谁知道 Ruby 设计 Singleton methods 的原因 at 2013年03月27日

    #13 楼 @iBachue 奥,原来这也叫 singleton methods 啊,我对这些没什么概念。

  • 有谁知道 Ruby 设计 Singleton methods 的原因 at 2013年03月27日

    我自己几乎没写过 Singleton methods,搜了一下

    http://www.rubyist.net/~slagell/ruby/singletonmethods.html

    Singleton methods are often used for elements of a graphic user interface (GUI), where different actions need to be taken when different buttons are pressed.

  • 有谁知道 Ruby 设计 Singleton methods 的原因 at 2013年03月27日

    #8 楼 @iBachue 是,我搞错了。

  • Ruby 社区应该去 Rails 化了 at 2013年03月27日

    #55 楼 @swordray 我也这样觉得

  • 有谁知道 Ruby 设计 Singleton methods 的原因 at 2013年03月27日

    Singleton methods 不是 Ruby 实现的模型,这个模式在面向对象编程的时候就有了,在《设计模式》里面被归类命名。

    Ruby 的语法可以很容易实现 Singleton methods,要做什么看你自己了。或者你可以看看《设计模式》(Java)这本书,还有一本《Ruby 设计模式》。

    我的看法,觉得怎么写好就怎么写,模仿别人的写法是捷径,我几乎不去想这是什么模式那是什么模式。

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