Ruby China
  • 社区
  • 招聘
  • Wiki
  • 酷站
  • Gems
  • 注册
  • 登录
@richfisher
高级会员
第 522 位会员 / 2011-12-21

2 篇帖子 / 64 条回帖
2 关注者
0 正在关注
72 收藏
GitHub Public Repos
  • sidekiq-enqueuer 34

    A Sidekiq Web extension to enqueue/schedule jobs with custom perform params in Web UI. Support bo...

  • wechat_pay_py 12

    Wechat pay V2 and V3.

  • jruby_activiti 8

    Integrate Activiti BPM in JRuby/Rails, including Activiti Engine, Modeler and Diagram Viewer.

  • getting-started-with-j... 5

    Getting started with JRuby

  • react-native-rncryptor... 4

    React Native RNCryptor AES 256

  • syntax_highlighter-rails 2

    SyntaxHighlighter for rails 3.1

  • react_3301 0

    https://github.com/facebook/react/issues/3301

  • activiti 0

    https://github.com/richfisher/jruby_activiti

  • extend-activiti-rest 0

  • richfisher.github.io 0

More on GitHub
  • 概况
  • 话题
  • 回帖
  • 收藏
  • 正在关注
  • 关注者
  • 有用 Roo 读取 Excel 的吗? at 2013年05月08日

    #4 楼 @hi54yt
    我是将它转回来

    cell.to_i if cell.is_a?(Float)
    
  • RAILS 应用的分拆方案 at 2013年03月06日

    Multiple Applications with Devise, Omniauth and Single Sign On http://blog.joshsoftware.com/2010/12/16/multiple-applications-with-devise-omniauth-and-single-sign-on/ 这种方案如何呢。

  • 重构 Rails 项目之最佳实践 at 2013年03月06日

    精彩!谢谢分享

  • 是不是应该慎用 namespace model at 2013年02月01日

    记得刚开始遇到不少坑,google 一下就好。

  • resque-scheduler 在特定时间,例如每天下午 5 点,在配置文件应该怎么写? at 2012年11月15日

    https://github.com/bvandenbos/resque-scheduler#description

    文档里有

    queue_documents_for_indexing:
      cron: "0 0 * * *"
      # you can use rufus-scheduler "every" syntax in place of cron if you prefer
      # every: 1hr
      # By default the job name (hash key) will be taken as worker class name.
      # If you want to have a different job name and class name, provide the 'class' option
      class: QueueDocuments
      queue: high
      args:
      description: "This job queues all content for indexing in solr“
    

    楼主搜下 crontab 的写法就懂了。

  • 集成支付宝付款求助 at 2012年10月21日

    #7 楼 @rubyonme 楼主问题解决了没呢?我也遇到同样的问题。

  • 有条件,就换 Mac at 2012年10月05日

    嗯嗯 楼主说的对. 正打算换

  • 使用 rails 的 migration 怎样将一个表中数据复制到另一个表 at 2012年09月16日

    #2 楼 @flypiggys

    将你的迁移写到 lib/tasks/下

    task :your_task => :environment do #do something end

    rake your_task

  • 分布式 Ruby 解决之道 - DRb at 2012年09月15日

    犀利!谢谢楼主分享!

  • 如何在数据库中存储二维数组? at 2012年04月18日

    active_record 可以用 serialize mongodb 就更方便了

  • 1.9.3 的速度 at 2012年02月01日

    爽!好像升级了电脑

  • MacOS Lion 不能通过局域网 ip 连接访问本地 Rails server [已解决] at 2012年01月18日

    和 apache 无关把。apache 默认用 80 确定 192.168.1.102 是你的 ip?

  • devise 自定义 登录页面 at 2012年01月17日

    用 devise_scope

    devise_scope :user do
      get "login", :to => "devise/sessions#new"
      get "register", :to => "devise/registrations#new"
      get "logout", :to => "devise/sessions#destroy"
      get "profile", :to => "devise/registrations#edit"
    end
    
  • 循环生成 radio 的问题 at 2012年01月16日

    #2 楼 @d4rkl0rd 你也可以代码判断啊

    <% xx.each do |value|%>
        <% if condition %> 
            <%=radio_button xxx,:checked => true%> 
        <% else %>
            <%=radio_button xxx%> 
        <% end %>
    <%end%> 
    

    view 中太多逻辑,应该提取为 helper

  • Rails 中的多表继承 at 2012年01月16日

    楼主如果时间充足可以了解下 Mongoid Mongoid 实现就比较简单。可以在继承的类中定义字段

    class Order
      include Mongoid::Document
    
      field :common,type: String
    end
    
    class TaobaoOrder < Order
      field :taobao_field,type:String
    end
    
    class PaipaiOrder < Order
      field :paipai_field,type:String
    end
    

    另外 Mongoid 支持 dynamic_fields,即使没定义也可以赋值。不过个人会将 allow_dynamic_fields to false

    这样是不是一个好的实践呢?@xdite,@bony,@ywencn

  • 1 at 2012年01月15日

    都是吃资源的怪兽,pro 可能好点,顺便锻炼身体:)

  • 关于 ruby-china 收藏的一句代码! at 2012年01月14日

    AR 的用法,Model.find_or_create_by_field1_and_field2_and_field3(value1,value2,vaule3)

  • Ruby china 是怎么建起来的啊? at 2012年01月13日

    rails new my_project

    推荐楼主看一遍《Agile Web Development with Rails》

  • 求推荐个好用的图表生成组件 at 2012年01月11日

    js 感觉最完善的是 Emprise JavaScript Charts,http://www.ejschart.com/ 不过收费的,免费版的有 watermark 和不少的限制

  • 在 Rails 中做代码高亮,只能依赖 Pygments 这个 Python 写的东东吗? at 2012年01月09日

    #3 楼 @Rei 谢谢,受启发做了一个 gem,syntax_highlighter-rails https://github.com/richfisher/syntax_highlighter-rails

  • 在 Rails 中做代码高亮,只能依赖 Pygments 这个 Python 写的东东吗? at 2012年01月08日

    #1 楼 @Rei 给力! 个人比较喜欢 SyntaxHighlighter,有行数

  • 推荐一篇反思文章 at 2012年01月07日

    #3 楼 @camel View 的设计手法网上也有不少文章和 Gem。 ViewModel 推荐看下 draper 这个 gem。

    http://kpumuk.info/ruby-on-rails/simplifying-your-ruby-on-rails-code/ 这篇文章是介绍 Presenter pattern 和 cells gem

  • 推荐一篇反思文章 at 2012年01月07日

    #1 楼 @fredwu 同意,越多人用骂声越多 Rails 提供了一个基本的框架。 大项目的设计是需要花心思的。 同时希望大牛们分享大项目的设计经验。

  • view 中的逻辑处理,helper vs draper? at 2012年01月07日

    #6 楼 @hooopo #7 楼 @Rei 学习了,谢谢!

  • view 中的逻辑处理,helper vs draper? at 2012年01月07日

    更广义的 view,不仅仅是网页 html,还可以是图片 jpg 业务上,我要在后台 html 看到用户的订单信息,还要生成订单信息的图片 jpg 打印出来。 生成图片我用 RMagick,这时 helper 就帮不上忙了,Draper 显得更合适。

  • view 中的逻辑处理,helper vs draper? at 2012年01月06日

    #2 楼 @Rei 但有些方法是模型特有的 比如 User#full_name,UserAddress#to_s(以某种格式显示用户地址)会在多个 Controller 中用到。 假如将多个 Controller 共用的 helper 提取到 ApplicationHelper,ApplicationHelper 就爆炸了。

  • 哈哈哈,上 Ruby 官方网站了 at 2012年01月04日

    Great job!希望 ruby china 越来越强大!

  • rails3.1.1 的程序要部署在子目录下该怎么配置 at 2012年01月03日

    @pzgz 不好意思啊,我以为是 view 里 子目录不知道怎么搞,子域名应该没问题。 楼主试下给 app 绑定个子域名?比如http://app.domain

  • 假的 Redis,fakeredis at 2012年01月03日

    开发 port install redis,port install mongodb 生成 yum install redis,yum install mongodb resque 和 resque scheduler 都正常运行

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