Ruby China
  • Topics
  • 招聘
  • Wiki
  • 酷站
  • Gems
  • Sign Up
  • Sign In
jimmy
@fresh_fish
VIP
NO. 395 / 2011-12-05

北京
29 Topics / 1168 Replies
14 Followers
11 Following
241 Favorites
GitHub Public Repos
  • kaixin 1

    Yo, from ie6 to mordern browsers

  • one_cms 1

    Simplest CMS system

  • jquery-sticky-header-r... 0

    A jquery plugin to make something sticky, relative to their parent.

  • fedex 0

    Ruby library to interact with FedEx Rate Web Service

  • exception-track 0

    Tracking ⚠️ exceptions for Rails application and store them in database.

  • wx_pay 0

    An unofficial simple wechat pay gem

  • one_cms_v2 0

  • h4cn 0

  • themes_on_rails 0

    Adds multi themes support to your Rails 3/4/5 application

  • DouyinHooker 0

    Xposed module for TikTok v4.9.8(TikTok助手) 突破锁区/修改地区/去水印/点赞自动保存

More on GitHub
  • Overview
  • Topics
  • Replies
  • Favorites
  • Following
  • Followers
  • ActiveRecord 如何根据 association 排序 at November 06, 2012
    ruby_exam = Exam.find_by_name('ruby')
    ruby_exam.results.includes(:user).order('results.score DESC')
    
  • ActiveRecord 求救?? at November 06, 2012

    我之前的做法是两个人各保存一份完整的对话记录

  • 求推荐能记账的好网站 at November 06, 2012

    给你推荐个简陋版本的 www.huanarle.com

  • [北京][11 月 3 日] 上午 [Code for Fun]+ 下午 [Ruby Open Party] at November 03, 2012

    难道散了?

  • [北京][11 月 3 日] 上午 [Code for Fun]+ 下午 [Ruby Open Party] at November 03, 2012

    没人啊!

  • [北京][11 月 3 日] 上午 [Code for Fun]+ 下午 [Ruby Open Party] at November 03, 2012

    我现在出发!

  • [北京][11 月 3 日] 上午 [Code for Fun]+ 下午 [Ruby Open Party] at November 03, 2012

    大家都去了吗?

  • [北京] 月薪 8k - 2w 招聘 Ruby 工程师 at November 02, 2012

    #15 楼 @lan_ya_tou 友情提醒,您别挖了,可能被喷... 有意向直接发简历吧

  • "Omniauth pure"上,实现国产 OAuth 认证 at November 02, 2012

    #5 楼 @yume 很好,很好

  • "Omniauth pure"上,实现国产 OAuth 认证 at November 01, 2012

    我关心的是头像是楼主本人不?

  • 我写的论坛软件现已开源:Rabel - PB2 on Rails at November 01, 2012

    能把 rmagick 换成 mini_magick 就更赞了

  • 请教一个问题, 如何将 `方法参数的输入' 反射到方法内? at November 01, 2012

    只能想到你传一个字符串进去 然后 eval

  • 我写的论坛软件现已开源:Rabel - PB2 on Rails at October 30, 2012

    赞!

  • 创业者们有没有兴趣分享自己产品的基础代码?我先来一个我们的 at October 30, 2012

    #15 楼 @mobiwolf 是的呀,很多代码直接拿过来用了,来 fork 吧!

  • 创业者们有没有兴趣分享自己产品的基础代码?我先来一个我们的 at October 29, 2012

    我最近写的一个站点 https://github.com/jimhj/wakmj.com, 有愿意和我一起写这个站点的同学么?

  • [强烈推荐] Railscasts-china 24 期 Two Daniel Pair Live Show 1 at October 29, 2012

    非常棒的视频,给人感觉很舒服

  • 绑定新浪微博发微博 at October 26, 2012

    #8 楼 @larryzhao 豆瓣我不清楚 按理说应该可以这样的吧

  • 绑定新浪微博发微博 at October 26, 2012

    #5 楼 @larryzhao 微博目前应该没有提供刷新 token 的接口

  • 绑定新浪微博发微博 at October 26, 2012

    是啊,现在微博就是这样啊,每次连接的话得重新授权,这时候你更新一下用户的 access_token 就行了。

  • 绑定新浪微博发微博 at October 26, 2012

    #2 楼 @larryzhao 每次用户使用新浪微博账号登录的时候,更新一下他的 token 就好,现在的 token 貌似是一个星期有效吧,你们不会在用户不登录的时候偷偷摸摸发什么东西吧?

  • 不刷新 上传文件 at October 25, 2012

    #8 楼 @glorySpring 用ajaxSubmit 这个插件,可以实现 ajax 提交表单,然后你在后台处理上传过程就行了 插件是 jquey.form.js

  • 不刷新 上传文件 at October 25, 2012

    单张上传的话其实简单 ajaxSubmit + form 后台

    def upload_photo
      photo = current_user.attachments.build(:photo => params[:photo])
      render :text => { :success => photo.save, :id => photo.id, :photo_name => params[:photo].original_filename }.to_json
    end
    

    js

    $('.attachment_panel.photo').find('a.submit').click ->
      $this = $(this)
      $file = $this.prev('input')
      if $file.val()?
        $this.parents('form').ajaxSubmit(
          dataType: 'json'
          beforeSend: ->
            $('a.uploadImage').find('span').text('正在上传...')
          success: (data) ->
            if data.success
              $('a.uploadImage').find('span').text(data.photo_name)
              $('#newAssistance').find('textarea').data('attachment_id', data.id)
              $this.closest('.attachment_panel').hide()
            else
              $('a.uploadImage').find('span').text('上传图片')
        )
    
  • 公司让我实现一个功能,该功能主要是针对图片的处理,大家来研究一下 at October 25, 2012

    1 楼 +1

  • 擦,姐生气了,要学 ruby!自己改网站 at October 24, 2012

    我想学做 UI

  • 正式启动我的 “用知识、劳动换知识、劳动” 的活动 at October 24, 2012

    #2 楼 @xiaolai 如何帮忙呢?

  • 正式启动我的 “用知识、劳动换知识、劳动” 的活动 at October 24, 2012

    老师,我可以不学习帮你开发网站么...

  • RubyConfChina 遇到的问题和对应策略 at October 24, 2012

    辛苦,支持!

  • 创业者们有没有兴趣分享自己产品的基础代码?我先来一个我们的 at October 24, 2012

    好像上上上次 在 ruby beijing party 上 听说你在 CSDN 啊

  • 关于 TwitterAPI:/1.1/statuses/update_with_media.json at October 23, 2012

    这是之前写的新浪微博的版本

    def build_and_post_multipart_bodies(faraday, url, parts)
      boundary = Time.now.to_i.to_s(16)
      body = ""
      parts.each do |key, value|
        esc_key = CGI.escape(key.to_s)
        body << "--#{boundary}#{CRLF}"
        if value.respond_to?(:read)
          body << "Content-Disposition: form-data; name=\"#{esc_key}\"; filename=\"#{File.basename(value.path)}\"#{CRLF}"
          body << "Content-Type: #{mime_type(value.path)}#{CRLF*2}"
          body << value.read
        else
          body << "Content-Disposition: form-data; name=\"#{esc_key}\"#{CRLF*2}#{value}"
        end
        body << CRLF
      end
      body << "--#{boundary}--#{CRLF*2}"
      response = faraday.post do |req|
        req.url url
        req.headers['Content-Type'] = "multipart/form-data; boundary=#{ boundary }"
        req.body = body
      end
    end
    

    不知道对你有没有用

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