Ruby China
  • Topics
  • 招聘
  • Wiki
  • 酷站
  • Gems
  • Sign Up
  • Sign In
stardiviner
@stardiviner
VIP
NO. 3681 / 2012-09-18

[email protected]
杭州
16 Topics / 114 Replies
1 Followers
0 Following
3 Favorites
要变强,才能掌控自己的人生。而自己的人生难免和别人相交,难免牵扯别人的人生。
GitHub Public Repos
  • google-translate 2

    Emacs interface to Google Translate

  • ellama 1

    ollama client for Emacs

  • chatgpt-shell 1

    ChatGPT and DALL-E Emacs shells + Org babel 🦄 + a shell maker for other providers

  • org-volume 1

    Org dynamic blocks for metadata of books

  • whisper.el 0

    Speech-to-Text interface for Emacs using OpenAI's whisper model and whisper.cpp as inference engine.

  • emacs-immersive-translate 0

  • devdocs.el 0

    Emacs viewer for DevDocs

  • melpa 0

    Recipes and build machinery for the biggest Emacs package repo

  • org-media-note 0

    Taking interactive notes when watching videos or listening to audios in org-mode.

  • circe-notifications 0

    Add desktop notifications to Circe.

More on GitHub
  • Overview
  • Topics
  • Replies
  • Favorites
  • Following
  • Followers
  • 大家都是怎么处理 Rails 版本升级后代码的更新问题的? at April 22, 2016

    @danjiang soga,嗯,受教了。

  • 搭建 Ruby China 开发环境 (Vagrant) at March 10, 2016

    不知道最新版的 vagrant box 镜像是否是打包好了所有安装组建的。

  • 搭建 Ruby China 开发环境 (Vagrant) at March 10, 2016

    赞同放到国内。翻墙到国外去下实在费流量。

  • 搭建 Ruby China 开发环境 (Vagrant) at March 10, 2016

    #8 楼 @origin10 我也遇到这个问题。

  • [已解决] @comment 的 params 无法获取 :article_id at February 26, 2016

    @qinfanpeng 再次多谢 hint,我找出为啥了,因为 article 用错了,应该用 instance variable @article, @article.published? 问题真正解决了。 下面是在 article model 中的代码片段 published? 定义。

    scope :published, lambda { where("articles.published_at IS NOT NULL") }
      scope :draft,     lambda { where("articles.published_at IS NULL") }
      # scope :recent,    lambda { published.where("articles.published_at > ?", 1.week.ago.to_date) }
      scope :where_title, lambda { |term| where("articles.title LIKE ?", "%#{term}%") }
    
  • [已解决] @comment 的 params 无法获取 :article_id at February 26, 2016

    根据 @qinfanpeng 所提示的 @comment.erros,我找到了错误在 comment 的 model 里,于是看了代码,发现错误在 validate :article_should_be_published.

  • [已解决] @comment 的 params 无法获取 :article_id at February 25, 2016

    @qinfanpeng 我修改后还是没有显示添加的 comment。而且提示 "Unable to add comment". 是无法添加 comment,我查看了 rails server 的输出:

    Processing by CommentsController#create as HTML
      Parameters: {"utf8"=>"✓", "authenticity_token"=>"VG73qck/3VCTMRhZpWK3JZg4I5jo0BCzeaZvPzbMjPT0eOWMS+zZZ5tsLCXWi/LXcSaWbjhBg1dEdyMj39y4HA==", "comment"=>{"name"=>"Tucker Freeman", "email"=>"[email protected]", "body"=>"Voluptas tempora sunt, eius est in laboriosam, ut id, atque vitae elit, in sed architecto debitis dolor voluptatibus quaerat sit."}, "commit"=>"Add", "article_id"=>"1"}
      Article Load (0.2ms)  SELECT  "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1  [["id", 1]]
       (0.2ms)  begin transaction
       (0.2ms)  rollback transaction
    Redirected to http://localhost:3000/articles/1
    Completed 302 Found in 31ms (ActiveRecord: 0.6ms)
    

    没看出什么端倪。我查看了 Comment.all 有之前添加的 comment,但是都没有 :article_id. 为啥改了代码之后就无法添加 comment 了呢?

  • [已解决] @comment 的 params 无法获取 :article_id at February 25, 2016

    @pathbox 加了。我添加代码道 -- UPDATE2 -- 里去。

  • [已解决] @comment 的 params 无法获取 :article_id at February 25, 2016

    @qinfanpeng 已添加 form 的代码,在 --UPDATE-- 下面

  • 怎么搞清楚 FormHelpers 里面的方法对应产生的 HTML attributes 在 Rails 里的作用和相互关系? at February 18, 2016

    #1 楼 @ericguo 看了你的 API 连接后,明白 id 和 name 这些 attributes 是怎么来的了。但是还是没搞明白作用和关系。

  • [SOLVED] 如何用 rails 和 js 写 checkbox 功能? at September 27, 2015

    确实,我学的速度慢的。

  • [SOLVED] 如何用 rails 和 js 写 checkbox 功能? at September 27, 2015

    #12 楼 @coderq 想必先生定是有大智慧的人了。

  • [SOLVED] 如何用 rails 和 js 写 checkbox 功能? at September 26, 2015

    @rei 这个文档很棒。全面。

  • [SOLVED] 如何用 rails 和 js 写 checkbox 功能? at September 26, 2015

    @zoker 还是 jQuery 的,虽然能明白大概,但是毕竟不懂。看了 @rei 的简单例子我就明白了。还是谢谢你。

  • [SOLVED] 如何用 rails 和 js 写 checkbox 功能? at September 26, 2015

    @rei 这个我看懂了,谢了。简单明了,之前看 w3school.com AJAX 的例子没明白它请求的 asp 页面。这里 /my/url 没有 base_url 是默认的么?

  • [SOLVED] 如何用 rails 和 js 写 checkbox 功能? at September 26, 2015

    @zoker 你给的链接里对我来说有点难了,上面的例子都是 ujs 和 jQuery 的,我还没学过 jquery。只想看看单纯用 js 是怎么写的代码。google 了你给的关键字搜索,前面的好几个结果都是使用 jquery 的。难道不先学 jquery 就无法理解么。。。

  • [SOLVED] 如何用 rails 和 js 写 checkbox 功能? at September 26, 2015

    @zoker 我搜索过 w3school.com 上看过 AJAX 的简单教程,但是没有看懂怎么应用。

  • [上海] 美国 Robin8 诚聘初、中 Ruby 工程师 3 名 [已结束 (感谢大家的关注)] at September 22, 2015

    @meeasyhappy 已发邮件 [email protected]

  • Rails 4.2.4 来了 at August 27, 2015

    @huacnlee 这隐藏的头是怎么生成的?

  • RubyConfChina 2015 大会官网,报名网址,博客上线 at August 27, 2015

    杭州去深证的火车 490 阿,去不起阿。本来想,难得门票白菜价,就头一回体验。还是望之却步。(为啥不支持 Ctrl+Enter 提交?)

  • 帖子管理建议 at August 24, 2015

    希望加这么一个东东,挺好的。

  • Rails 4-2-stable 参考手册 (Beta) at August 18, 2015

    赞一个!

  • [深圳] 小团队招聘 Ruby 工程师 / 实习生 at May 15, 2015

    @over140 我还是 Rails 小白的说,看了你们的招聘贴,只招有经验的阿。

  • Playing with Constants, Methods, and Superclasses at May 15, 2015

    这个很牛逼阿。

  • [深圳] 小团队招聘 Ruby 工程师 / 实习生 at May 15, 2015

    @everants right, 学了东西,最后还是需要应用的。

  • [深圳] 小团队招聘 Ruby 工程师 / 实习生 at April 26, 2015

    @everants 也给我一份试试?

  • [深圳] 小团队招聘 Ruby 工程师 / 实习生 at April 26, 2015

    @everants 实习生还收么?

  • [深圳] 小团队招聘 Ruby 工程师 / 实习生 at April 26, 2015

    @everants oh,不是,一直很向往。

  • [深圳] 小团队招聘 Ruby 工程师 / 实习生 at April 25, 2015

    @everants 我这样小白的招么? https://stardiviner.github.io/about/resume/

  • 怎么给一个已经写了大半的 Rails 项目重命名 at March 29, 2015

    Emacs 对 rename 还是很简单的阿

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