Web開發框架 - Rails 3.2.3 RC1 發布

openkk 12年前發布 | 7K 次閱讀 Rails

Rails 3.2.3 RC1 發布了,該版本修改了 config.active_record.whitelist_attributes 的默認值為 true,該版本會影響到新生成的應用程序,那些使用升級的用戶不存在向后兼容性問題,更詳細的信息請看 ruby on rails security guide

與 3.2.2 版本比較,該版本改進記錄:

Action Mailer

  • Upgrade mail version to 2.4.3 ML

Action Pack

  • Do not include the authenticity token in forms where remote: true as ajax forms use the meta-tag value DHH
  • Turn off verbose mode of rack-cache, we still have X-Rack-Cache to check that info. Closes #5245. Santiago Pastorino
  • Fix #5238, rendered_format is not set when template is not rendered. Piotr Sarnacki
  • Upgrade rack-cache to 1.2. José Valim
  • ActionController::SessionManagement is deprecated. Santiago Pastorino
  • Since the router holds references to many parts of the system like engines, controllers and the application itself, inspecting the route set can actually be really slow, therefore we default alias inspect to to_s. José Valim
  • Add a new line after the textarea opening tag. Closes #393 rafaelfranca
  • Always pass a respond block from to responder. We should let the responder to decide what to do with the given overridden response block, and not short circuit it. sikachu
  • Fixes layout rendering regression from 3.2.2. José Valim

Active Model

  • No changes

Active Record

  • Added find_or_create_by_{attribute}! dynamic method. Andrew Whited
  • Whitelist all attribute assignment by default. Change the default for newly generated applications to whitelist all attribute assignment. Also update the generated model classes so users are reminded of the importance of attr_accessible. NZKoz
  • Update ActiveRecord::AttributeMethods#attribute_present? to return false for empty strings. Jacobkg
  • Fix associations when using per class databases. larskanis
  • Revert setting NOT NULL constraints in add_timestamps fxn
  • Fix mysql to use proper text types. Fixes #3931. kennyj
  • Fix #5069 - Protect foreign key from mass assignment through association builder. byroot
Web開發框架 - Rails 3.2.3 RC1 發布

Ruby on Rails 是一個用于開發數據庫驅動的網絡應用程序的完整框架。Rails基于MVC(模型- 視圖- 控制器)設計模式。從視圖中的Ajax應用,到控制器中的訪問請求和反饋,到封裝數據庫的模型,Rails 為你提供一個純Ruby的開發環境。發布網站時,你只需要一個數據庫和一個網絡服務器即可。

Ruby On Rails是一個用于編寫網絡應用程序的軟件包.它基于一種計算機軟件語言Ruby,給程序開發人員提供了強大的框架支持.你可以用比以前少的多的代碼和 短的多的時間編寫出一流的網絡軟件.比較著名的社區網站43things.com, odeo.com和basecamphq.com就是用Ruby On Rails編寫的.

Ruby On Rails的指導原則是”不要重復你自己”(Don’t Repeat Yourself, 或DRY).意思是說你寫的代碼不會有重復的地方.比如以往數據庫的接口往往是類似的程序代碼但是在很多地方都要重復用到.這無論是給編寫還是維護都造成 了很大的代價.相反,Ruby On Rails給你提供了絕大多數的支持,讓你只需要短短的幾行代碼就可以實現強大的功能.而且,Rails提供了代碼生成工具,讓你甚至不需要編寫一行代碼 就實現強大的管理程序.

Ruby On Rails通過reflection和runtime extension減少了對configuration文件的依靠,這和Java,C#語言的方向有很大不同,讓你減少了很多配置和部署的麻煩,但是性能上卻完全可以應付一般網站的需求.

Rails 支持各類網絡服務器和數據庫。在服務器方面,我們推薦Apache、 lighttpd 或 nginx 代理至 Mongrel (或者使用FastCGI)。 數據庫方面,你可以采用MySQL、PostgreSQL、 SQLite、 Oracle、 SQL Server、 DB2、 或其他任何我們支持的系統。 Rails可以在各類操作系統上運行,不過我們建議采用基于'nix的系統進行開發。

 本文由用戶 openkk 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!