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

[email protected]
nil
北京
160 篇帖子 / 3013 条回帖
360 关注者
0 正在关注
74 收藏
聪明的妖怪录下了唐僧的紧箍咒
打赏作者
GitHub Public Repos
  • oh-my-github-circles 47

    GitHub User Circle Generator Using GitHub Actions

  • hackernews-insight 21

    Hackernews Insight using TiDB Cloud

  • repo-track-pipeline 6

    🔄 A flexible open-source data pipeline for seamlessly syncing data from any repository to your da...

  • oh-my-github-pipeline 6

    🔄 A flexible open-source data pipeline for seamlessly syncing data from any github user to your d...

  • chatgpt-xiaoai 3

    小爱音箱集成LLM,SaaS 服务

  • repo-contributor-circles 1

    GitHub repo contributor circles generator.

  • ossinsight-x 1

    Automatically post trending repos to Twitter every day.

  • mi-service 1

    XiaoMi Cloud Service for mi.com

  • hooopo 0

  • streamlit-echarts-demo 0

    Demo for Streamlit ECharts component

More on GitHub
  • 概况
  • 话题
  • 回帖
  • 收藏
  • 正在关注
  • 关注者
  • PR 到 4 了 at 2013年12月20日

    #2 楼 @googya 这。。。大家都在 Top 100 活跃会员里嘛,,莫非是中间的位置 PR 会高?

  • PR 到 4 了 at 2013年12月20日

    #1 楼 @bhuztez 涨了啊!

  • 好像 Ruby 的性能问题始终是个大问题啊! at 2013年12月20日

    擦!真是个大问题啊!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

  • Ruby on Rails 4.1 发布记 at 2013年12月20日

    ⭐ ⭐ ⭐ ⭐ ⭐

  • 为 Grape 和 Jbuilder 的非 Rails 应用增加缓存的 Gem at 2013年12月19日
    1. 为什不需要 gem,贴一下 sinatra + rabl 的,静态化、HTTP cache、temple cache、JSON cache 都有了。 ruby get "/v1/products" do @products = Product.xxxxxxxx.per(params[:per_page] || 20).order(params[:order] || "id DESC") etag(@cache_key = Digest::MD5.hexdigest([@products.map{|product| product.updated_at}, request.query_string].join)) render :rabl, :"v1/products/index", :format => "json" end

    products/index.rabl

    object false
    
    cache [:products, @cache_key]
    
    child(:meta) do
      node(:pagination){|_| pagination_hash(@products)}
      node(:message){|_| @message}
    end
    
    node(:data) do
      partial("v1/products/_product", :object => @products)
    end
    

    静态化:

    get "/v1/global_nav" do
      expires 2.weeks, :public, :must_revalidate
      etag(@cache_key = [Time.now.strftime("%Y%m"), "global_nav", request.query_string].join)
      # logic here
       render :rabl, :"v1/global_nav", :format => :json
    end
    
  • 为 Grape 和 Jbuilder 的非 Rails 应用增加缓存的 Gem at 2013年12月19日

    #3 楼 @Victor Rack Cache 更完备一些。。

  • 为 Grape 和 Jbuilder 的非 Rails 应用增加缓存的 Gem at 2013年12月19日

    这也要 gem?

  • RJS leaking vulnerability in multiple Rails applications at 2013年12月18日

    http://edgeguides.rubyonrails.org/4_1_release_notes.html#csrf-protection-from-remote-script-tags

  • Rails 4.1.0 beta 发布了 at 2013年12月18日

    #6 楼 @huacnlee mail_view 和 letter opener 这些预览不靠谱啊。。因为真实的邮件客户端不支持很多 css 特性。还需要发到邮箱里到邮箱里测试。

    http://css-tricks.com/using-css-in-html-emails-the-real-story/

  • Rails 4 的 Observer 为什么会去掉? at 2013年12月11日

    #6 楼 @_samqiu ovserver = callback box..

  • Rails 4 的 Observer 为什么会去掉? at 2013年12月11日

    因为没人用!

  • DHH 再次重申,Rails 项目应该拥抱 SJR,别去整啥 JSON-Client render 方案。 at 2013年12月11日

    真的有那么多 Fat Client 么?内容还是最主要的呀..

  • DHH 再次重申,Rails 项目应该拥抱 SJR,别去整啥 JSON-Client render 方案。 at 2013年12月11日

    #41 楼 @small_fish__ http://ruby-china.org/topics/15904#reply3

  • strong parameters 用起来有点不自在,有什么好的使用方法? at 2013年12月08日

    https://github.com/erichmenge/signed_form

  • many-to-many 关联 at 2013年12月07日

    #5 楼 @fengkuok 查询的时候可以不一定使用 join,可以拆分成一个 select 和一个 in 查询。修改关系的时候也更灵活。添加额外信息的时候更方便。。

  • many-to-many 关联 at 2013年12月07日

    中间表有其他信息的单独建 model。即使没有其他信息我也单独建 model,并且加主键。

  • 这里有 80 后妈妈或者爸爸们吗? at 2013年12月05日

    楼主 你已经分享两次了

  • 最近在纠结,到底用 MongoDB 还是 MySQL at 2013年12月05日

    #37 楼 @bhuztez 应该叫 EAV Anti-Pattern 吧。

  • 最近在纠结,到底用 MongoDB 还是 MySQL at 2013年12月05日

    #39 楼 @luikore 有可能是 VPS...

  • boy 还是 girl? at 2013年12月04日

    这么难的问题,你 at 错人了..

  • 并行赋值的使用场景 at 2013年12月03日

    #25 楼 @bhuztez 👍

  • 并行赋值的使用场景 at 2013年12月03日

    #23 楼 @bhuztez 那是伪码!

  • 最近在纠结,到底用 MongoDB 还是 MySQL at 2013年12月03日

    #22 楼 @fredwu 👍

  • [广州] 招聘 Ruby 程序员 at 2013年12月02日

    #123 楼 @lmorenbit 谢谢 😄

  • RJS leaking vulnerability in multiple Rails applications at 2013年11月30日

    我觉得 JSONP leak 和 UJS leak 这两个相关的事件上,homakov 有些小题大做。

    在使用 JSONP 解决跨域问题时,开发者首先要考虑的是,自己可以跨域了,同时也给了攻击者跨域的机会。跨域传输的内容是否敏感,是否有修改资源行为,这是需要开发者去权衡的。对于确实有敏感内容和修改资源行为的 jsonp 请求,可以参考这里的最后面一节所提的方案解决。

    回到 UJS,对于修改资源的请求,一般正确使用 HTTP verb 就没问题..因为有 CSRF 防御。如果真是获取私有内容,验证一下request.xhr?或验证 csrf_token 同样解决问题。

  • 有没有必要买一本《Ruby 元编程》 at 2013年11月27日

    没必要。

  • 京东的客服妹妹萌爆了有木有,让人火气瞬间全无。。 at 2013年11月23日

    我觉得对各种常见情况的回答都有模板。。。

  • [求建议] 创建广州大学城 Ruby 小组 at 2013年11月23日

    #28 楼 @Tony612 哇

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