Ruby China
  • 社区
  • 招聘
  • Wiki
  • 酷站
  • Gems
  • 注册
  • 登录
张超
@bony
高级会员
第 22 位会员 / 2011-11-01

安徽易睿众联管理咨询有限公司
合肥
21 篇帖子 / 395 条回帖
0 关注者
0 正在关注
22 收藏
yep!!!
GitHub Public Repos
  • suna 0

    Suna - Open Source Generalist AI Agent

  • droidrun 0

  • go-captcha-resources 0

    This is a GoCaptcha resources

  • go-captcha-example 0

    A collection of examples for go-captcha, including implementations in Golang, Vue3, Vue2, React, ...

  • go-captcha-assets 0

    This is the assets of GoCaptcha

  • qiweidoc 0

    免费开源的企微会话存档解决方案,本地化私有部署。 随时随地查看员工聊天记录,聊天记录永久保存。

  • go-captcha 0

    🖖 GoCaptcha is a behavior captcha, which implements click mode, slider mode, drag-drop mode and r...

  • ZUGFeRD-Manager 0

    A desktop application, that creates and validates ZUGFeRD invoices.

  • go-captcha-jslib 0

    🖖 GoCaptcha of Javascript, which implements click mode, slider mode, drag-drop mode and rotation ...

  • go-captcha-vue 0

    🖖 GoCaptcha of Vue, which implements click mode, slider mode, drag-drop mode and rotation mode.

More on GitHub
  • 概况
  • 话题
  • 回帖
  • 收藏
  • 正在关注
  • 关注者
  • 问个小白问题,在 view 中,如何 render 其他的 action 内容呢? at 2012年06月03日

    ajax.。。。别用 render 什么的了,直接用 json,前台用 js 处理。或者直接弹个 window,redirect_to 到你从表的编辑页面(看起来傻一点,不过简单。)

  • 问个小白问题,在 view 中,如何 render 其他的 action 内容呢? at 2012年06月03日

    #8 楼 @lukefan 局部渲染就用 ajax。你不妨把你逻辑说一下,看看有没有更好的办法。

  • 问个小白问题,在 view 中,如何 render 其他的 action 内容呢? at 2012年06月03日

    #6 楼 @lukefan render 本身是渲染一个模板,并不执行 action,你这种就已经传了参数给 action,然后返回的结果。这个只能 redirect_to.

  • 问个小白问题,在 view 中,如何 render 其他的 action 内容呢? at 2012年06月03日

    2.2.3 Rendering an Action’s Template from Another Controller

    What if you want to render a template from an entirely different controller from the one that contains the action code? You can also do that with render, which accepts the full path (relative to app/views) of the template to render. For example, if you’re running code in an AdminProductsController that lives in app/controllers/admin, you can render the results of an action to a template in app/views/products this way:

    render 'products/show'
    

    Rails knows that this view belongs to a different controller because of the embedded slash character in the string. If you want to be explicit, you can use the :template option (which was required on Rails 2.2 and earlier):

    render :template => 'products/show'
    

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

  • Ruby in China 和 Ruby-China 都处于发展阶段,我们仍需努力 at 2012年06月02日

    社区就像一个聚会,各式各样的人聚在一起谈论着不同的话题。
    你的话题让人感兴趣,你身边可能就会有很多人围着与你讨论。
    反之,就没人会甩你。
    不要怪别人不回答你的问题,而是要知道为什么别人不回答。
    而且,别人也没有义务去回答,回答也是纯粹的雷锋精神在帮助人,不说感恩了,最起码的应该尊重每一个回答你问题的人。
    另一方面,也要尊重提问的人,如果他的问题让你厌恶或者不削,你可以不回答,但是不要讽刺,攻击。
    这样才能和谐么。。

  • 注意 sql injection 漏洞 at 2012年06月02日

    从来不直接把 params 直接往查询里丢。
    一直奉行“宁可费事,不要出事。”

  • 请问大家用什么来进行 Ruby 的 debug at 2012年05月30日

    动态语言 debug 还不如直接 Log。。

  • Ruby 的名气是不是 Rails 带来的? at 2012年05月30日

    #21 楼 @gaicitadie 你是站在 python 的角度来看 ruby,所以就永远没有办法领会 ruby 冗余的精髓。
    python 和 java 的设计思想是很类似的,就是标准化,一致化,一个功能最好就一个实现方式。
    这样是有好处的,可以让大规模的协作编程更容易,但同时丧失了灵活性和创造性。
    ruby 的初衷是 coding for fun,可以让程序员更容易更有趣的编程,更加的灵活,更加的符合人类语言的规则。
    自然语言本身就是冗余的。表达同一个意思也会有不同的词汇。就像 ruby 中有 size(),也有 length(),有的人习惯用 size(),有的人习惯用 length(),没必要限定到一个上来。
    而且 ruby 的这种冗余不但没有让程序可读性变差,反而变的更好,更符合人类的阅读习惯,从“诗歌体”上就能看出来。
    在这种 coding for fun 的精神的领导下,ruby 社区一直都是在追求好用的 API,流畅的 DSL,使得编程愈加的人性化。

  • 请问有用 Rails 做的 开源 B2B 网站吗? at 2012年05月24日

    #4 楼 @huobazi B2B 更像 ERP,电子商务的部分反而很简单。。

  • IE9 下发现一个小 BUG at 2012年05月23日

    bootstrap IE 下很悲剧。。还是别整 IE 了。

  • Grove, 类似 Campfire 的在线聊天工具 at 2012年05月23日

    http://www.webim20.cn/

    一个老几基于 Erlang 写的一个 WebIM,很不错的。

  • 第一期 Railscasts-china live show 视频 with @huacnlee (第二期也已发布) at 2012年05月18日

    有爱啊,这才是真正好的视频教程啊。

  • GeaKit--another social coding project in China at 2012年05月16日

    不错,不错。

  • 短域名是如何实现的 at 2012年05月14日

    这个肯定是 guid

  • 某些国人还真的是热衷于作弊啊…… at 2012年05月09日

    所以 linkedin 才会火。

  • Rails 的开发者们都玩些什么游戏? at 2012年05月06日

    连连看

  • 有谁在工作或生活中实践 GTD at 2012年05月04日

    几度尝试几度失败

  • 关于下一版本 Ruby China 的功能计划 at 2012年05月03日

    我觉得可以让一个帖子一个人只能回复一次,能修改。可以大大减少水量,而且看起来也方便,,

  • 关于结对编程的效果 at 2012年05月03日

    一男一女肯定没问题,两个男人如果搞基的话肯定也没问题。否则,肯定别扭。

  • Railsconf 2012 - 國際性 Conference 是這樣辦的 at 2012年04月29日

    羡慕台湾同胞有刀有时间。出国还方便。

  • 现在可以发布代码了,用 ``` ``` 包起来 at 2012年04月28日

    这是什么情况,。?

  • coder 球迷归属之问卷调查 at 2012年04月27日

    曾经喜欢皇马,但自从劳尔走了以后,就厌倦了这种商业游戏。。

  • 给这个节点添个树叶吧 at 2012年04月25日

    @fsword erlang 在国外,在大规模,高并发的项目中已经很流行了。在中国也已经已经步入逐渐成熟阶段。。erlang 的 mail-list 每天都有很多讨论。

  • 给这个节点添个树叶吧 at 2012年04月25日

    erlang 主要是平台好。非常好。。

  • rubychina 最近咋感觉好慢啊 at 2012年04月24日

    确实很慢。。。我觉得应该加个防重复提交。

  • rubychina 最近咋感觉好慢啊 at 2012年04月24日

    sina 的内网和 ruby-china 有什么关系?

  • 翻译就像在玩网游. at 2012年04月24日

    辛苦,辛苦。。

  • rubychina 最近咋感觉好慢啊 at 2012年04月24日

    我觉得没变化,挺快的。。

  • 1000 个小时学会 Rails - 001 你的第一个 Rails 应用 at 2012年04月22日

    awesome 等连载完可以整理出书 书名就叫《苍老湿,rails 和你的 1000 小时》

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