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

[email protected]
深圳
182 篇帖子 / 9132 条回帖
727 关注者
0 正在关注
11 收藏
中下水平 Rails 程序员
打赏作者
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
  • 概况
  • 话题
  • 回帖
  • 收藏
  • 正在关注
  • 关注者
  • rails 3.2 实现 agile web 第四版 ajax 问题 at 2012年10月18日

    $('#cart').html("Your Cart<\/div>\n\n\n \n 1×<\/td>\n CoffeeScript<\/td>\n $36.00<\/td>\n<\/tr>\n\n \n Total<\/td>\n $36.00<\/td>\n <\/tr>\n<\/table>\n\n<\/div><\/form>\n");

    把这段代码放到浏览器的 javascript console 里面执行一下看看什么效果

  • [头脑风暴] 除了钱,大家还喜欢其他什么激励 at 2012年10月18日

    尊重

  • 会 Rails 的人玩 Mobile 的话选 Android 多还是 iPhone 多 at 2012年10月18日

    用 Android,不过不会开发。

  • 如何实现自定义字段 at 2012年10月18日

    一个序列化 Hash 字段也行。

  • 半年多了,我来发个言 at 2012年10月18日

    我赞成写教程的时候不要替换自带的组件,写教程是需要让看的人懂而不是自我满足,不过实际用的项目不用 slim(我新项目会转 slim)和 mongodb 会让我很痛苦。未来我如果写文章的话区分一下入门和进阶,入门的都用原生组件做示例,进阶就用我喜好的。最近很忙没产出就是了。

  • Ruby On Rails 和 NodeJS 的比较 at 2012年10月17日

    #10 楼 @suriv 我从没有把我自己定位成后端开发,是 js 这个语言确实糟糕(http://wtfjs.com/),我不会因为浏览器环境没有别的选择而催眠自己这个语言其实很好。

    性能问题是多么奢侈,遇到性能问题那天我肯定会放鞭炮的,因为说明应用火了。

  • 请教一个 before_filter 针对用户是否登录的 写法 at 2012年10月17日

    比较惯用的做法是一个 current_user 方法,一个 require_logined 方法,current_user 是调用的时候获取,不需要作为过滤器,require_logined 是过滤器,给需要登录的 action 加上。

    实际在用的代码例子 https://github.com/chloerei/code_campo/blob/master/app/controllers/application_controller.rb

  • Ruby On Rails 和 NodeJS 的比较 at 2012年10月17日

    #8 楼 @suriv http://expressjs.com/ 有个类 sinatra 的

    前端写 js 已经把我折磨够了,后端是绝对不会想用这个语言。事件驱动可以参考。

  • [重新描述] 在 DB 挂掉的时刻,怎么保证另一个不需要挂掉 DB 的网页可以正常浏览? at 2012年10月16日

    public 下面有个 500.html,默认是这个

  • 为啥我本地部署 ruby china, 注册用户,发不出邮件呢? at 2012年10月16日

    看 /var/log/mail.log,sendmail 程序有没有收到命令,有无错误

  • 组队学习 ruby-china at 2012年10月16日

    #11 楼 @lihuazhang 遇到问题就去解决没有错

    ruby china 的代码其实很庞大,不太适合入门学习。

  • 我认为 Guide 教程里的 “scaffolding” 纯粹是引新人入坑。元芳,你怎么看? at 2012年10月16日

    Getting Started with Rails This guide covers getting up and running with Ruby on Rails. After reading it, you should be familiar with:

    • Installing Rails, creating a new Rails application, and connecting your application to a database
    • The general layout of a Rails application
    • The basic principles of MVC (Model, View Controller) and RESTful design
    • How to quickly generate the starting pieces of a Rails application

    我觉得 getting started 的任务已经完成了。想看完 getting started 就开始开发实际应用,我觉得怎么都不可能的。

  • ruby 中如何定位 DAO at 2012年10月16日

    #5 楼 @weiwei5987 ActiveRecord 有两个魔法字段 created_at 和 updated_at,如果你的表里面已经有这两个字段,它就会在保存和更新的时候自动填上。

    如果是其他需要自动更新的字段,我会写一个 before_update callback

  • ruby 中如何定位 DAO at 2012年10月16日

    继承了 ActiveRecord 之后,Model 里面已经有一堆方法了,比如 Task.create。

    添加新方法可以先放在 Model 里,复杂的跨 Model 的再考虑新添类。

  • 关于 while 的疑问 at 2012年10月15日

    楼主格式化代码要这样

    ruby if start_year.to_i > end_year.to_i puts "Starting year should smaller than ending year!" else puts "leap year between " + start_year + " and " + end_year +" :" end

    效果

    if start_year.to_i > end_year.to_i
      puts "Starting year should smaller than ending year!"
    else
      puts "leap year between " + start_year + " and " + end_year +" :"
    end
    
  • 就教:怎么知道一个 method 继承自哪里 class 或 module? at 2012年10月15日

    #2 楼 @5long 擦,我才知道

  • 看上去 GemBundler 并没有解决版本冲突的问题啊 at 2012年10月15日

    我也脚得应该自动解决

  • 新手不学 rspec 可以吗? at 2012年10月14日

    没有明确理由的话不需要用 rspec

  • ruby 如何实现连减 at 2012年10月12日

    [1, 2, 3, 4, 5].inject(&:-)

  • if 与 ||=的优先级 at 2012年10月12日

    @current_user ||= User.find_by_id(session[:user_id])

    不抛异常版本

  • Ruby 中 i++ 问题? at 2012年10月11日

    Matz 可能觉得这个操作不好就不加进来,我也觉得不好。

  • VIM 下 使用 SASS, 保存即可见? at 2012年10月11日

    我用 livereload,一边写 sass 一边看浏览器效果。看生成的 css 没什么必要吧。

  • 有靠谱的飞机订票点推荐吗? at 2012年10月11日

    携程

  • 什么情况下需要用 redis at 2012年10月10日
    1. 希望快速响应的数据
    2. 数据库不方便储存的结构
  • TMD 社区就是牛逼 at 2012年10月10日

    我还以为 TMD 是什么新社区……

  • Bitbucket 这次改版后感觉比 Github 好看多了 at 2012年10月10日

    被 JIRA 虐得不行,所以对相关服务也没啥好感了。

  • “渲染 xml 和 json 数据” 不太懂 at 2012年10月09日

    要 Google 不要百度。

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