diff options
author | Prem Sichanugrist <s@sikachu.com> | 2011-09-02 21:35:24 +0700 |
---|---|---|
committer | Prem Sichanugrist <s@sikachu.com> | 2011-09-04 11:55:12 +0700 |
commit | b84cee08c6129717d7c3291918f06f95cc9eb916 (patch) | |
tree | 84dcf7af7d54265602f7499ed69ca5cec345ebdd /actionpack/CHANGELOG | |
parent | d50c0acc95d9ac9b258594c7d68e1eeef9b6d41e (diff) | |
download | rails-b84cee08c6129717d7c3291918f06f95cc9eb916.tar.gz rails-b84cee08c6129717d7c3291918f06f95cc9eb916.tar.bz2 rails-b84cee08c6129717d7c3291918f06f95cc9eb916.zip |
Make `content_tag_for` and `div_for` accepts the array of records
So instead of having to do this:
@items.each do |item|
content_tag_for(:li, item) do
Title: <%= item.title %>
end
end
You can now do this:
content_tag_for(:li, @items) do |item|
Title: <%= item.title %>
end
Diffstat (limited to 'actionpack/CHANGELOG')
-rw-r--r-- | actionpack/CHANGELOG | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG index 71f38797ae..289325ba89 100644 --- a/actionpack/CHANGELOG +++ b/actionpack/CHANGELOG @@ -1,5 +1,21 @@ *Rails 3.2.0 (unreleased)* +* content_tag_for and div_for can now take the collection of records. It will also yield the record as the first argument if you set a receiving argument in your block [Prem Sichanugrist] + + So instead of having to do this: + + @items.each do |item| + content_tag_for(:li, item) do + Title: <%= item.title %> + end + end + + You can now do this: + + content_tag_for(:li, @items) do |item| + Title: <%= item.title %> + end + * send_file now guess the mime type [Esad Hajdarevic] * Mime type entries for PDF, ZIP and other formats were added [Esad Hajdarevic] |