Ruby China
  • Topics
  • 招聘
  • Wiki
  • 酷站
  • Gems
  • Sign Up
  • Sign In
Rei
@Rei
Admin
NO. 1 / 2011-10-28

[email protected]
深圳
182 Topics / 9132 Replies
727 Followers
0 Following
11 Favorites
中下水平 Rails 程序员
Reward
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
  • Overview
  • Topics
  • Replies
  • Favorites
  • Following
  • Followers
  • 搜索框里放一个放大镜的背景图片,如何能点击他调用搜索功能呢? at January 16, 2015

    #2 楼 @a4652097 CSS 样式把 button 背景设为透明去掉边框然后移动到输入框内不就融为一体了么。

  • 异步多服务器任务操作框架 at January 16, 2015

    DRb?

    http://www.ruby-doc.org/stdlib-2.2.0/libdoc/drb/rdoc/DRb.html

  • [已解决] 谁来解读一下 Rails 4.2.0 中的 respond_to 与 respond_with?诸如 redirect_to [:admin, @project] 怎么写? at January 16, 2015

    #3 楼 @chairy11 旧项目升级 rails 了没

  • 搜索框里放一个放大镜的背景图片,如何能点击他调用搜索功能呢? at January 16, 2015
    <button type="submit">
      <img src="path/to/image">
    </button>
    
  • 异步多服务器任务操作框架 at January 16, 2015

    resque

  • [已解决] 谁来解读一下 Rails 4.2.0 中的 respond_to 与 respond_with?诸如 redirect_to [:admin, @project] 怎么写? at January 16, 2015

    我读书少你不要骗我,4.2.0 生成的脚手架明明是这样的:

    class ProjectsController < ApplicationController
      before_action :set_project, only: [:show, :edit, :update, :destroy]
    
      # GET /projects
      # GET /projects.json
      def index
        @projects = Project.all
      end
    
      # GET /projects/1
      # GET /projects/1.json
      def show
      end
    
      # GET /projects/new
      def new
        @project = Project.new
      end
    
      # GET /projects/1/edit
      def edit
      end
    
      # POST /projects
      # POST /projects.json
      def create
        @project = Project.new(project_params)
    
        respond_to do |format|
          if @project.save
            format.html { redirect_to @project, notice: 'Project was successfully created.' }
            format.json { render :show, status: :created, location: @project }
          else
            format.html { render :new }
            format.json { render json: @project.errors, status: :unprocessable_entity }
          end
        end
      end
    
      # PATCH/PUT /projects/1
      # PATCH/PUT /projects/1.json
      def update
        respond_to do |format|
          if @project.update(project_params)
            format.html { redirect_to @project, notice: 'Project was successfully updated.' }
            format.json { render :show, status: :ok, location: @project }
          else
            format.html { render :edit }
            format.json { render json: @project.errors, status: :unprocessable_entity }
          end
        end
      end
    
      # DELETE /projects/1
      # DELETE /projects/1.json
      def destroy
        @project.destroy
        respond_to do |format|
          format.html { redirect_to projects_url, notice: 'Project was successfully destroyed.' }
          format.json { head :no_content }
        end
      end
    
      private
        # Use callbacks to share common setup or constraints between actions.
        def set_project
          @project = Project.find(params[:id])
        end
    
        # Never trust parameters from the scary internet, only allow the white list through.
        def project_params
          params[:project]
        end
    end
    

    4.2.0 一个需要注意的改动就是类级 respond_to 移到了 gem http://guides.rubyonrails.org/4_2_release_notes.html#respond-with-class-level-respond-to

  • [前端知识] Flexbox,更优雅的布局 at January 16, 2015

    半年前用过一下发现 flex-grow 在 safari 下有问题,于是换回基于浮动和百分比的布局。

  • Sidekiq:导致 Frozen Worker 的两个风险 at January 15, 2015

    调用支付宝接口,不但要 timeout,还要 retry。

  • 一套代码多个域名,怎么设置多个 root :to at January 15, 2015

    https://github.com/chloerei/writings/blob/cc51d5f51636f16aa0468a0bf26d98e972ae88f7/config/routes.rb#L110

  • ruby1.8.7 如何安装 nokogiri at January 15, 2015
    ERROR:  Could not find a valid gem 'nokorigi' (>= 0) in any repository
    ERROR:  Possible alternatives: nokogiri, nokorexi, nokogirl
    

    你不看字的么……

  • gem 包使用中,对相关 js, css 引用问题 at January 15, 2015

    你两个问题不是冲突了么。

  • AngularJS 为什么成功了? at January 14, 2015

    The problem with Angular http://www.quirksmode.org/blog/archives/2015/01/the_problem_wit.html

    Hacker News http://cheeaun.github.io/hackerweb/#/item/8886041

  • Rails 3.0.5 下 rake 不能工作,怎么破? at January 14, 2015

    rake 版本写到 Gemfile 然后 bundle exec rake

  • [上海] Strikingly 团队招聘后端 / 运维工程师 at January 14, 2015

    Y Combinator 经历也要晒一晒嘛。

  • 大家都是如何学习 Rails 开发的 at January 14, 2015

    #15 楼 @rails_on_ll 你要在译者眼皮底下求盗版?

  • 大家都是如何学习 Rails 开发的 at January 14, 2015

    #13 楼 @rails_on_ll 就写个博客好了。

  • 大家都是如何学习 Rails 开发的 at January 14, 2015

    其实最重要的还是开始写,楼主你提到了博客,那么创建了项目了没有?

  • Rails 需要登录才能进行操作的 action 是否使用 collection 会好一点? at January 14, 2015

    楼主说的是嵌套资源路由吧。让访问权限体现在 URL 里是比较好处理一点,Basecamp 是这样,Github 也是这样。

  • sinatra 中计划任务的问题 at January 14, 2015

    #6 楼 @ywjno 我还没用上。

  • sinatra 中计划任务的问题 at January 14, 2015

    #2 楼 @ywjno https://devcenter.heroku.com/articles/scheduler

  • 大家都是如何学习 Rails 开发的 at January 14, 2015

    http://railstutorial-china.org/

  • Ruby-China 的会员们能合力做点什么商业项目吗? at January 14, 2015

    The perils of mixing open source and money http://david.heinemeierhansson.com/2013/the-perils-of-mixing-open-source-and-money.html

  • 怎么抓取 https 页面的源码 at January 13, 2015
    require 'open-uri'
    
    puts open('https://ruby-china.org/topics/23714').read
    
  • Ruby 为什么要设计成 13/(-3)=-5? at January 12, 2015

    不自动转型,向下取整。

  • 为什么 Go 在中国这么流行?(英文) at January 12, 2015

    我想到了!因为中国人多……

  • [北京 / 远程] 墨刀 (MockingBot) 招聘 Rails 全栈工程师 at January 12, 2015

    厉害,已经需要招人了。

    团队目前有 3 个人,除我之外还有 2 个漂亮妹子

    这个要烧! 🔥 🔥 🔥

  • 被备案搞崩溃,求推荐靠谱的国外主机服务 at January 12, 2015

    #11 楼 @moliliang 现在是过剩的,估计 1 G 都够了,不过增加一些冗余是好的。HTTPS 消耗可以忽略。

  • 为什么 Go 在中国这么流行?(英文) at January 12, 2015

    国内大规模使用 Go 的我只想起七牛,感觉也没有特别流行。

    敢于用新技术说明公司由 Hacker 主导,会有不少技术优势。

  • 自己初学 Ruby on Rails 想做一个简单 Web 应用,求资料 at January 12, 2015

    http://guides.ruby-china.org/ http://railstutorial-china.org/

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