Ruby China
  • 社区
  • 招聘
  • Wiki
  • 酷站
  • Gems
  • 注册
  • 登录
陈小紫
@cassiuschen
管理员
第 9162 位会员 / 2013-09-16

chzsh1995@gmail.com
北京
62 篇帖子 / 1022 条回帖
52 关注者
2 正在关注
77 收藏
GitHub Public Repos
  • bdfzer-writing 5

    北大附中在线写作系统 - 基于 Writings.io

  • akeso_frontend 1

  • yxtimes 1

    新版银杏时报

  • administrate-field-json 0

    A plugin to show and edit JSON objects within Administrate.

  • administrate-field-act... 0

    support active storage in adminstrate

  • SearchAPITest 0

    For Testing Synced Searching API

  • GirlsCodingDayDemo 0

  • chrome-ext 0

  • vimrc 0

    我的Vim配置及插件

  • activestorage_qiniu 0

    Wraps the Qiniu Storage Service as an Active Storage service

More on GitHub
  • 概况
  • 话题
  • 回帖
  • 收藏
  • 正在关注
  • 关注者
  • 曾经沧海难为水 at 2014年02月19日

    #22 楼 @wongyouth #21 楼 @bitbegin 叫做 ServerAuditor,免费的 ssh-client…也是我用过最稳定、最便捷的 ssh 客户端…也有 pad 版。调试部署都在服务端完成啊不可能本地做…剩下的就跟你 ssh 连服务器一样该怎么干怎么干就是了……BTW VNC 免费的客户端推荐Remote VNC

  • [已解决] 在 Rails 4.0.2 中使用 hstore… at 2014年02月19日

    #7 楼 @Rei 还是 Rei 比较厉害😚

  • [已解决] 在 Rails 4.0.2 中使用 hstore… at 2014年02月19日

    #5 楼 @small_fish__ 不知道能不能这么理解…一般 store 类型数据存入之后每个数据一行,没有数据就存入 nil,hstore 给 hash 单开一行,储存的所有键值都在这一行, 举例说:

    User:
      id:integer
      name:string
      extra:hstore
    

    对于

    u1 = User.new(
      id: 1,
      extra: { name: "Bob" }
    )
    u1.save
    #<User id=1, name=nil, extra={'name'=>'Bob'}>
    
    u2 = User.new(
      id: 2,
      name: "Bob",
      extra: { age: 18 }
    )
    u2.save
    #<User id=2, name='Bob', extra={'ago'=>18}>
    

    之类的都是可以同时存在的………一些信息新建、取用更自由更方便……

  • 曾经沧海难为水 at 2014年02月19日

    #18 楼 @bhuztez 恩恩………有了 ssh,一切就都有了!

  • 用 JS 写一个 FlappyBird at 2014年02月19日

    #8 楼 @chairy11 人家………人家已经年满 18 了........

  • polymorphic 关联的 model, 在 form 中如何写成 select tag at 2014年02月19日

    3.1 The Select and Option Tags The most generic helper is select_tag, which — as the name implies — simply generates the SELECT tag that encapsulates an options string:

    <%= select_tag(:city_id, 'Lisbon...') %> This is a start, but it doesn't dynamically create the option tags. You can generate option tags with the options_for_select helper:

    <%= options_for_select([['Lisbon', 1], ['Madrid', 2], ...]) %>

    output:

    Lisbon Madrid ... The first argument to options_for_select is a nested array where each element has two elements: option text (city name) and option value (city id). The option value is what will be submitted to your controller. Often this will be the id of a corresponding database object but this does not have to be the case.

    Knowing this, you can combine select_tag and options_for_select to achieve the desired, complete markup:

    <%= select_tag(:city_id, > options_for_select(...)) %> options_for_select allows you to pre-select an option by passing its value.

    <%= options_for_select([['Lisbon', 1], ['Madrid', 2], ...], 2) %>

    output:

    Lisbon selected="selected">Madrid ... Whenever Rails sees that the internal value of an option being generated matches this value, it will add the selected attribute to that option.

    查看全文

  • 用 JS 写一个 FlappyBird at 2014年02月18日

    啊还有这个……管子跳跃躲鸟…http://flynngao.github.io/FlappyTube/

  • 用 JS 写一个 FlappyBird at 2014年02月18日

    你搜搜看杜蕾斯也做了一个……蝌蚪跳啊跳,躲过各种…

  • 曾经沧海难为水 at 2014年02月18日

    #11 楼 @lidashuang 这是我学习 vim 的原因和动力………

  • 曾经沧海难为水 at 2014年02月18日

    #6 楼 @zealinux 躺中………表示超过 80% 的邮件从 iPhone 上发送,空闲时间都拿 iPhone 搞开发啊有木有……有图有真相: 随时 hotfix、部署、调试简直太爽…

  • 曾经沧海难为水 at 2014年02月18日

    iPhone 全键盘现在打字每分钟 120 字以上无压力……关键在于熟悉…

  • [北京] 盖亚魔力 GaiaMagic - 通往未知世界的红色药丸 - 招聘 Rails/ 前端 /iOS/android/ 设计师 /PR/ 音乐项目经理 /GrowthHacker at 2014年02月18日

    为什么有一种前端要会的 Rails 工程师都会………………好吧给这个点赞啊看产品思路个人很喜欢的样子!突然觉得 Github 模式可以在更多领域发挥重要作用……嗯………

  • 已经部署的项目,使用 unicorn+nginx at 2014年02月18日

    Nginx 直接读取的是 unicorn 的 socket,所以不用重启 nginx…数据库改动在 database.yml 中加入

    host: where.is.your.database
    port: 9527 #你数据库开放的端口。比如postgresql默认5432
    

    然后重启就可以了。当然你需要在远程数据库上开放远程登录。以 psql 举例,/etc/postgresql/9.1/main/pg_hba.conf中需要加入相关信息…以上。

  • [已解决] 在 Rails 4.0.2 中使用 hstore… at 2014年02月18日

    #2 楼 @small_fish__ 在没有太大性能要求的时候用来做 key-value 存储嘛…

  • [已解决] 在 Rails 4.0.2 中使用 hstore… at 2014年02月18日

    #1 楼 @chunlea 谢了!原来已经不需要那个 gem 了……

  • 问一个新手提取文件名的问题 at 2014年02月18日

    #2 楼 @yeyong14 我 Ruby 写得不怎么好……只想到这么表达: /\/(\w{3,})\.pdf/……前提是文件名大于三个字符………你还是用 @iBachue 的方法吧……

  • 问一个新手提取文件名的问题 at 2014年02月18日

    正则就行了…

  • [深圳] 招聘高级 Rails 软件工程师 at 2014年02月17日

    实习生最小招多小的>~<

  • 看了一遍 Programing ruby,下面做些什么小程序练手? at 2014年02月17日

    我是写了个爬虫、一个自动下载新版本工具软件包的脚本、写了个计算基因频率的东西然后就 rails 了………

  • 从别的地方找到的,我估计新手会喜欢的。我整理一下发布 at 2014年02月16日

    作为新手顶一个……很多都是常见场景…

  • Peatio (貔貅) 电子加密货币交易所准备开源并征集内测用户 at 2014年02月16日

    顶一个!支持开源!希望参与测试!chzsh1995@gmail.com

  • 如何用 Nokogiri 移除 Style? at 2014年02月15日

    #3 楼 @chunlea #4 楼 @Kabie #5 楼 @allenwei 谢谢!

  • 如何用 Nokogiri 移除 Style? at 2014年02月15日

    #1 楼 @ruohanc 啊请教一下是哪个方法 T…T 翻了半天文档没发现在哪里……

  • 把红宝石拍扁了放在标题栏中间也许不错 at 2014年02月13日

    #7 楼 @darkbaby123 主要是风格比较搭

  • Peat.io 准备用 Discourse 重构? at 2014年02月13日

    #10 楼 @ksec elasticsearch 我赶脚唯一的缺点就是内存占用太大……discourse 的搜索好像是一个 gem 做的

  • Peat.io 准备用 Discourse 重构? at 2014年02月13日

    #10 楼 @ksec discourse 的讨论系统设计很科学。帖子与帖子间也可以存在从属关系,这是方便从一个讨论引发出的其他讨论。另外 discourse 的自动抓去链接内容、选中文字引用回复之类的,都是为了更好的讨论优化的。用作讨论区虽然重,但是确实还很好用。

  • 把红宝石拍扁了放在标题栏中间也许不错 at 2014年02月13日

    #4 楼 @huacnlee 用 rubyconf 那个吧~

  • 单点登录,登录后显示:请在集成入口中重新登陆 at 2014年02月13日

    #4 楼 @zhangyanan 那你只能找到 ca s 入口了…

  • 单点登录,登录后显示:请在集成入口中重新登陆 at 2014年02月12日

    #2 楼 @zhangyanan 这是 cas 的问题啊……可能是读取 ticket 的时候跳转至此或者应用端 cas-client 的设置跳转到了这个页面,你客户端只能找到它所谓的集成入口登录 cas 才行…或者你有源码修改设置…能提供更详细的信息么?

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