jRails – Ruby on Rails 的 jQuery plugins

, , at April 17th, 2008 by 小影

Rails 內置 Prototype 和 scriptaculous ,可以只用 Rails 就能寫出 Ajax 軟件。這不錯,但如果是 jQuery 陣型的朋友可能就會覺得不夠 friendly。 jRails 就是解決這個問題的 rails plugins 。安裝後它會取代原本 Rails 的 javascript, prototype 和 scriptaclous helpers,基本上不用改 Rails 的源碼,但在 client side 就變成使用 jQuery 了。 讀過源碼,基本上是用 monkey patching 的方式取代原本的 PrototypeHelper、ScriptaculousHelper。說不上優雅,但在 Rails core team 將原本的 javascript helper refactor 成 pluggable 前就將就一下吧。

更新: Ruby on Rails plugin i18n

, , , at June 30th, 2007 by 小影

讀了 Takol 的 【ROR開發筆記】MultiLingual ,他提出的用 browser header 去自動選擇 i18n 語言比我原本的想法好多了!Open Source 的好處,我把這功能加入了 i18n plugins 中。 另外稍為更改了安裝 URL (script/plugin install http://mod-i18n.googlecode.com/svn/trunk/plugins/i18n),安裝後 plugin 會放在 /vender/plugins/i18n ,比較 standard 的作法。 相關連結: mod i18n project Homepage @ Google Code 【ROR開發筆記】MultiLingual