Ruby China
  • Topics
  • 招聘
  • Wiki
  • 酷站
  • Gems
  • Sign Up
  • Sign In
@kikyous
VIP
NO. 2564 / 2012-06-16

[email protected]
西安
88 Topics / 875 Replies
20 Followers
0 Following
13 Favorites
GitHub Public Repos
  • ChatGPT-Nuxt-Web 10

  • bootstrap3-sass 4

    bootstrap-sass 3 continue

  • vscode-css-action 3

    A vscode extension help editing scss/less file with color replace and px convert.

  • mitmfile.py 2

    Define and load mitmproxy config easy

  • easy_form 2

    form builder without complex dsl

  • tc-dev-enhance 1

  • vue3-ui-test 0

  • Clash.Meta 0

    A rule-based tunnel in Go.

  • inertia-rails 0

    The Rails adapter for Inertia.js.

  • deno_deploy_cors_proxy 0

    Deno Deploy CORS Proxy

More on GitHub
  • Overview
  • Topics
  • Replies
  • Favorites
  • Following
  • Followers
  • 关于 included 方法的问题 at May 31, 2016

    #1

    def self.included(mod)
      puts "#{self} is included in #{mod}"
    end
    

    是定义方法,不是调用,调用的逻辑并不在这里

  • Puma 的相关资料为啥我觉得那么少? at May 28, 2016

    #15 楼 @samport 分享一下你的 centos puma 启动脚本

  • Rails 命令无响应,如何确定问题所在 at May 23, 2016

    #1 楼 @eailfly bundle update 之后 spring 版本变化了,和正在运行的 spring 实例不兼容

  • Rails 命令无响应,如何确定问题所在 at May 23, 2016
    spring stop
    
  • MySQL FULLTEXT MATCH 在 Rails 中怎么搞? at May 18, 2016

    关注

  • 老婆业余为程序媛猿朋友们提供 财务,税务,工商,社保等方面的咨询哦 at May 16, 2016

    我女朋友也是财务😁

  • 记事本编辑器是不是应该和发帖一样 at May 16, 2016

    #1 楼 @huacnlee 还有记事本输入框默认高度太高了,在我的显示器上滚动才能看到保存按钮,应该也像回帖那样 autoresize

  • 推荐一个 mina 的插件 mina-logs 给大家 at May 16, 2016

    mina log 默认就有

  • GitHub 大幅降低了资费, 7 刀无限私有仓库 at May 12, 2016

    原先是多少

  • 小型 Rails 团队 (1-10 人) 使用哪种 Bug 管理跟踪工具会比较顺手? at May 11, 2016

    tower

  • [西安] Ruby/Rails 线下聚会 at May 11, 2016

    #14 楼 @thumbor #15 楼 @_ly610

  • 一键将你的 Rails 应用变成 PHP 应用 at May 10, 2016

    6666

  • Ransack 不支持中文选项怎么办?输出的 HTML 都是一样的,把中文直接 cut 掉了 at May 06, 2016
    value.to_s.gsub(/\s/, "_").gsub(/[^-\p{Word}]/, "").downcase
    

    这样应该也可以

  • Ransack 不支持中文选项怎么办?输出的 HTML 都是一样的,把中文直接 cut 掉了 at May 06, 2016

    #9 楼 @xlaok

    value.to_s.gsub(/\s/, "_").gsub(/[^-\d\p{L}]/, "").downcase
    

    其实就是个正则表达式而已

  • Ransack 不支持中文选项怎么办?输出的 HTML 都是一样的,把中文直接 cut 掉了 at May 06, 2016

    或许我应该发一个 PR 给 rails,因为根据 w3c 的定义,属性值是支持 cjk 字符的

  • Ransack 不支持中文选项怎么办?输出的 HTML 都是一样的,把中文直接 cut 掉了 at May 05, 2016

    在 config/initializers 新增一个文件 action_view_cjk.rb

    module ActionView::Helpers::Tags
      class Base
         def sanitized_value(value)
            #value.to_s.gsub(/\s/, "_").gsub(/[^-\w]/, "").downcase
            value.to_s.gsub(/\s/, "_").gsub(/[^-\p{L}]/, "").downcase
         end
      end
    end
    
  • Ransack 不支持中文选项怎么办?输出的 HTML 都是一样的,把中文直接 cut 掉了 at May 05, 2016

    遇到过这个问题,明天给你在以前的项目看看

  • 如何 create 使得 after_save 回调不执行 at April 20, 2016

    after_update

  • 上线用户活跃状态图,类似 GitHub at April 14, 2016

    样式变了吗,还以为显示器出问题了

  • Rails nested layout at April 13, 2016

    #3 楼 @ashchan 嗯,但是我觉得 rails guide 里面说的 Using Nested Layouts 没有 parent_layout 好

  • codeRay 无法高亮 bash 语法 at April 12, 2016

    推荐 rouge https://github.com/jneen/rouge

  • RailsDiff - 对比每个版本 Rails 默认生成出来的文件的差别 at April 12, 2016

    :plus1: 有用

  • 上线 status 页面,显示 Ruby China 背后服务的运作是否正常 at April 07, 2016

    昨天要回帖的时候一直返回 500

  • ActiveRecord 用 bulk_insert 来批量插入数据,提高效率 at April 07, 2016

    https://github.com/zdennis/activerecord-import

  • [已解决] 在 has_many, :through 的多对多关系中,如果获得中间表的 model 内容? at April 05, 2016

    贴代码吧

  • [已解决] 在 has_many, :through 的多对多关系中,如果获得中间表的 model 内容? at April 05, 2016

    doctor.appointments 应该没问题啊

  • 在 Rails 5.0.0.beta2 中表单提交空信息 at March 29, 2016

    https://github.com/rails/rails/issues/23438

  • simple_form_for 表单 f.association 乱码 at March 15, 2016

    #11 楼 @jasonliu 这有什么困扰的,to_s 是 rails way

  • simple_form_for 表单 f.association 乱码 at March 15, 2016

    #7 楼 @xiqingxl to_s 就是告诉 rails 怎么把一个 Cat 实例转化成字符串

    默认的 to_s 方法执行的结果就是#这样

  • simple_form_for 表单 f.association 乱码 at March 15, 2016

    在 cat mdoel 里面定义 to_s

    def to_s
      name
    end
    
  • Prev
  • 1
  • 2
  • …
  • 5
  • 6
  • 7
  • 8
  • 9
  • …
  • 28
  • 29
  • Next
关于 / RubyConf / Ruby 镜像 / RubyGems 镜像 / 活跃会员 / 组织 / API / 贡献者
由众多爱好者共同维护的 Ruby 中文社区,本站使用 Homeland 构建,并采用 Docker 部署。
服务器由 赞助 CDN 由 赞助
iOS 客户端 / Android 客户端 简体中文 / English