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

[email protected]
深圳
188 篇帖子 / 9165 条回帖
731 关注者
0 正在关注
11 收藏
中下水平 Rails 程序员
打赏作者
GitHub Public Repos
  • writings 941

    [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**

  • geeknote 34

  • 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

More on GitHub
  • 概况
  • 话题
  • 回帖
  • 收藏
  • 正在关注
  • 关注者
  • 请教如何在 CoffeScript 代码中获取 Asset Pipeline 的图片地址 at 2014年06月26日

    2.3.3 JavaScript/CoffeeScript and ERB

    If you add an erb extension to a JavaScript asset, making it something such as application.js.erb, you can then use the asset_path helper in your JavaScript code:

    $('#logo').attr({ src: "<%= asset_path('logo.png') %>" });
    

    This writes the path to the particular asset being referenced.

    Similarly, you can use the asset_path helper in CoffeeScript files with erb extension (e.g., application.js.coffee.erb):

    $('#logo').attr src: "<%= asset_path('logo.png') %>"
    

    http://guides.rubyonrails.org/asset_pipeline.html#javascript-coffeescript-and-erb

  • Lisp 实现加一操作 at 2014年06月25日
    )))))
    
  • 用 JSHint 帮助提高代码质量 at 2014年06月25日

    vim 用户可以用 https://github.com/scrooloose/syntastic 进行整合。

  • 纯静态网站,如何做 form 提交? at 2014年06月25日

    别开发,用现成的。

  • ruby 2.0 的 irb 删除字符后显示异常 at 2014年06月25日

    不好用指什么?异常是什么异常?

  • 1 at 2014年06月25日

    OMG!

  • 给你 12 个胆,你敢不敢这样玩? at 2014年06月24日

    以前有景区游客拍照,“后退后退后退”然后摔下去的新闻。

  • Teahour.FM 57 期, 和 Andor 还有 Rei 一起聊聊技术类书籍的翻译和自出版 at 2014年06月24日

    #12 楼 @turingbook 本来就是外行啊。欢迎你分享一些内行看法。

  • Teahour.FM 57 期, 和 Andor 还有 Rei 一起聊聊技术类书籍的翻译和自出版 at 2014年06月24日

  • MacDown - 开源的 Markdown 编辑器 at 2014年06月23日

    我觉得 http://www.iawriter.com/ 这种有高亮无预览的编辑器才是符合 markdown 初衷。

  • 开源绘图软件 Krita 募捐中 at 2014年06月23日

    #21 楼 @chiangdi 我也觉得这形象更像弗利萨

  • 开源绘图软件 Krita 募捐中 at 2014年06月23日

    #19 楼 @ksec 对我来说还要先买个 Mac。

  • 开源绘图软件 Krita 募捐中 at 2014年06月22日

    #12 楼 @saiga 之前兴趣铺得太多了,编程、吉他、日语、绘画、博客,然后发现精力不足够都维持下来,就剩下编程和博客了。不过回想有很多时间都是发呆浪费掉的,可能会重拾绘画。

  • 开源绘图软件 Krita 募捐中 at 2014年06月22日

    #8 楼 @saiga 我学画画没坚持下去……从入门来看更喜欢 MyPaint 的布局和功能。

  • 开源绘图软件 Krita 募捐中 at 2014年06月22日

    #9 楼 @saiga mint 16 是上一代?Kubuntu 上一个 LTS 12.04 是要折腾驱动的,14.04 就不用了。

  • 开源绘图软件 Krita 募捐中 at 2014年06月22日

    吉祥物很重要……

    https://twitter.com/Krita_Painting/status/441855256318586880/photo/1

  • 开源绘图软件 Krita 募捐中 at 2014年06月22日

    #4 楼 @saiga 偶,发现官网确实统一成 Intuos 了。

  • 开源绘图软件 Krita 募捐中 at 2014年06月22日

    #4 楼 @saiga 3 的无线是可选模块。我系统是 kubuntu 14.04。

    KDE 各种高大全:

  • 开源绘图软件 Krita 募捐中 at 2014年06月22日

    #2 楼 @saiga 我有块 wacom bamboo 3,除了板边的实体键,无线和笔的两头等等都支持得很好,插上就识别。

  • 开源绘图软件 Krita 募捐中 at 2014年06月22日

    然后发现 Twitter 上还有这种帐号:

    https://twitter.com/DBZNappa

  • ActiveRecord 真的是 ORM 吗? at 2014年06月21日

    #22 楼 @zacker330 开发阶段一个 model 一个 migration,上线之后增量 migration。看数据库最终结构看 schema.rb。

  • ActiveRecord 真的是 ORM 吗? at 2014年06月21日

    #16 楼 @zacker330 我意思是 ActiveRecord 不想增加太多默认行为,有可能对开发形成干扰。

  • ActiveRecord 真的是 ORM 吗? at 2014年06月21日

    Mongodb 是无模式的,不需要模式迁移,所以 mongoid 可以直接把属性写在 model 里,但是数据迁移始终需要 migration。

    ActiveRecord 就是既然要写 migration 了,那就不用在 model 里面写属性定义了;而不是在 model 里面定义一次属性,然后再写一次 migration。

  • ActiveRecord 真的是 ORM 吗? at 2014年06月21日

    #16 楼 @zacker330 开发过程如果没有协作开发需求,可以修改同一个 migration,然后 rake db:migration:redo STEP=n。多人开发也可以,不过可能协作者会需要经常 reset 加抱怨。

    schema.rb 是快速导入数据库模式的时候用的,比如 test 环境和 production 环境,另外可以让开发者完整看到目前数据库的模式。每次 migration schema.rb 都会重新生成,千万不要手动改这个文件。

  • ActiveRecord 真的是 ORM 吗? at 2014年06月21日

    #12 楼 @billy 我是同时考虑数据库结构和 Model 的,没有从哪个开始思考之分。

  • ActiveRecord 真的是 ORM 吗? at 2014年06月21日

    Rails 开发不是直接改 db/schema.rb ,而是写 migration 脚本(http://docs-china.com/rails/migrations.html)。ActiveRecord 不需要声明属性,它自动读取数据库现有的属性。关系不会自动生成,可能是不想做得太多。

    我搜了一下 hibernate 有个 SchemaUpdate 工具,自动根据 model 属性增删数据库表字段,不清楚是不是真的在生产环境用这个工具。Rails 用的 migration 的好处是显示声明,可以纳入版本控制,可回滚操作,可以在模式迁移的同时写上数据迁移。

  • ActiveRecord 真的是 ORM 吗? at 2014年06月21日

    #5 楼 @i5ting 是我不懂楼主疑问在哪里。或者楼主说说以前用的工具是怎么做的?

  • ActiveRecord 真的是 ORM 吗? at 2014年06月21日

    #2 楼 @zacker330 清空你的知识,接收它。

  • ActiveRecord 真的是 ORM 吗? at 2014年06月21日

    Active Record 基础 http://docs-china.com/rails/active_record_basics.html

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