[ANN] Rails 0.9.4: Caching, filters, SQLite3…

  • Thread starter David Heinemeier Hansson
  • Start date
D

David Heinemeier Hansson

Another incredibly strong release sees the light of day as we move one
step closer to the mythical 1.0. This release tackles one of the five
steps on the roadmap in form of caching as well as adding a bunch of
other cool stuff.

* *Render Caching:* Added an extensive caching module that offers three
levels of granularity (page, action, fragment) and a variety of stores
(file, memory, DRb, MemCached).

* *Conditional filters:* It's now possible to limit the actions that a
given filter will apply to within a controller using either :eek:nly or
:except. Like, <code>before_filter :authorize, :eek:nly => [ :edit,
:delete ]</code>

* *Associating unsaved objects:* Associations between unsaved objects
makes it much easier to build big graphs that only makes sense to be
saved together.

* *Database compatibility:* SQLite3 is now supported by the sqlite
adapter and MySQL 4.1.1+ is also supported by the included Ruby/MySQL
driver.

* *Numeric bytes and time:* Rails has taken upon itself to extend Ruby
in a few spots, such as adding the possibility for expressions like
<code>45.kilobytes + 2.3.megabytes</code> and <code>45.minutes +
2.hours + 1.fortnight</code>.

Those were the highlights, but Rails 0.9.4 includes no less than 50
changes, fixes, and features. You can read the full story in the
changelogs:

* Active Record: http://ar.rubyonrails.com/files/CHANGELOG.html
* Action Pack : http://ap.rubyonrails.com/files/CHANGELOG.html
* Rails : http://rails.rubyonrails.com/files/CHANGELOG.html

This release shouldn't require any changes to your application if
you're coming from Rails 0.9.3.
--
David Heinemeier Hansson,
http://www.basecamphq.com/ -- Web-based Project Management
http://www.rubyonrails.org/ -- Web-application framework for Ruby
http://macromates.com/ -- TextMate: Code and markup editor (OS X)
http://www.loudthinking.com/ -- Broadcasting Brain
 
A

Alexander Kellett

* *Numeric bytes and time:* Rails has taken upon itself to extend Ruby
in a few spots, such as adding the possibility for expressions like
<code>45.kilobytes + 2.3.megabytes</code> and <code>45.minutes +
2.hours + 1.fortnight</code>.

very neat idea!

i can imagine this being useful elsewhere,
maybe it could be added to the transamis
facets collection?

Alex
 
T

trans. (T. Onoma)

23 AM, David Heinemeier Hansson wrote:
| > * *Numeric bytes and time:* Rails has taken upon itself to extend Ruby
| > in a few spots, such as adding the possibility for expressions like
| > <code>45.kilobytes + 2.3.megabytes</code> and <code>45.minutes +
| > 2.hours + 1.fortnight</code>.
|
| very neat idea!
|
| i can imagine this being useful elsewhere,
| maybe it could be added to the transamis
| facets collection?

yes, very neat indeed! thanks for suggestion, i will look into it.
 
M

Marcel Molina Jr.

very neat idea!

Some of the "credit" here should go to Richard Kilmer who demoed some
code at RubyConf 2004 that showcased him using methods on Numeric for
more readable time code such as the 3.hours + 45.minutes stuff.

Neat indeed. Ruby makes it easy!

marcel
 
D

David Heinemeier Hansson

Some of the "credit" here should go to Richard Kilmer who demoed some
code at RubyConf 2004 that showcased him using methods on Numeric for
more readable time code such as the 3.hours + 45.minutes stuff.

All of the credit should go to Richard ;). This is very much just an
implementation of his great ideas. So is the DSL direction of Rails as
well. Can't wait for RubyConf '05 to be inspired by great ideas of
Richard and others again ;)
--
David Heinemeier Hansson,
http://www.basecamphq.com/ -- Web-based Project Management
http://www.rubyonrails.org/ -- Web-application framework for Ruby
http://macromates.com/ -- TextMate: Code and markup editor (OS X)
http://www.loudthinking.com/ -- Broadcasting Brain
 
L

leon breedt

* *Numeric bytes and time:* Rails has taken upon itself to extend Ruby
in a few spots, such as adding the possibility for expressions like
<code>45.kilobytes + 2.3.megabytes</code> and <code>45.minutes +
2.hours + 1.fortnight</code>.
What do you think of adding:

def octet_units(fmt='%.2f')
case
when self < 1.kilobyte
"#{self} bytes"
when self < 1.megabyte
"#{fmt % (self.to_f / 1.kilobyte)} KB"
when self < 1.gigabyte
"#{fmt % (self.to_f / 1.megabyte)} MB"
when self < 1.terabyte
"#{fmt % (self.to_f / 1.gigabyte)} GB"
else
"#{fmt % (self.to_f / 1.terabyte)} TB"
end
end

to the Numeric helpers?

Leon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,192
Latest member
KalaReid2

Latest Threads

Top