split, parents, replace
2009年5月19日 星期二
2009年5月15日 星期五
2009年5月13日 星期三
2009年5月11日 星期一
2009年5月3日 星期日
Rails 2.3 Extras
Rails 2.3 Extras
Batch Find
What's New in Edge Rails: Batched Find
One quick caveat exists: you can’t specify :order or :limit in the options to find_each or find_in_batches as those values are used in the internal looping logic.
Batched finds are best used when you have a potentially large dataset and need to iterate through all rows. If done using a normal find the full result-set will be loaded into memory and could cause problems. With batched finds you can be sure that only 1000 * (each result-object size) will be loaded into memory
Dynamic Scopes
What's New in Edge Rails: Dynamic Scope Methods
Default Scopes
What's New in Edge Rails: Default Scoping
Object#try
try()
you can avoid nil-checking by writing code like <%= @person.try(:name) %>. Well, now it’s baked right into Rails. As implemented in Rails, it raises NoMethodError on private methods and always returns nil if the object is nil.
Smart Rendering of Partials
What's New in Edge Rails: render Stops Being High-Maintenance
Unified Rendering
Batch Find
What's New in Edge Rails: Batched Find
One quick caveat exists: you can’t specify :order or :limit in the options to find_each or find_in_batches as those values are used in the internal looping logic.
Batched finds are best used when you have a potentially large dataset and need to iterate through all rows. If done using a normal find the full result-set will be loaded into memory and could cause problems. With batched finds you can be sure that only 1000 * (each result-object size) will be loaded into memory
Dynamic Scopes
What's New in Edge Rails: Dynamic Scope Methods
Default Scopes
What's New in Edge Rails: Default Scoping
Object#try
try()
you can avoid nil-checking by writing code like <%= @person.try(:name) %>. Well, now it’s baked right into Rails. As implemented in Rails, it raises NoMethodError on private methods and always returns nil if the object is nil.
Smart Rendering of Partials
What's New in Edge Rails: render Stops Being High-Maintenance
Unified Rendering
rails engines
把一支 app 可以像plugin 一樣 裝到另外一支 application 裡
Rails Engines railscast
Engines in Rails 2.3
Rails Engines Make your plugins more powerful.
Rails Engines railscast
Engines in Rails 2.3
Rails Engines Make your plugins more powerful.
訂閱:
文章 (Atom)