Rails 3 is out two months ago and you are probably aware of most of its features. Today, I won't describe how to use such features, but instead I will give you the concepts and reflections behind some internal changes. And to do that, we will need to look at Rails 2.3 several times, to help us understand the differences.
Each object implement few methods, so it is very easy to replace them.
Rails 2.3 hacked into Rubygems to allow gems to work as engines so things like app/ could work.
Extra paths = db/migrate, public and vendor/plugins
Extra paths = db/migrate, public and vendor/plugins
Rails 3 is definitely amazing and brought several improvements but it could be even better! For example, while everyone loves ARel, it reduced ActiveRecord performance a bit. So we need to work on that for future releases. And this is why we are going to talk about Rails 3.1.
As DHH already did in on latest Rails Conf, from now we will have spoilers about the future of Rails.
Client cache now works, but what about server side? If on every first request from a client we have to render a file, it will be slow. Once we render a .js file for one person, it is available for everyone.
This means all the work we have done for client side caching of JS will just work on Server Side as well.
There is no need to learn one extra thing. Learn just HTTP Cache and you will be fine.
If every time we get a record, we store it in the hash, in a few requests we will have the whole database in our hash.
If every time we get a record, we store it in the hash, in a few requests we will have the whole database in our hash.
WeakHash is a hash where its key and/or values can be garbage collected.
Experienced Rails developers knows that this is a bad practice, but why should it?
This may be in Rails 3.1, maybe 3.2 or maybe never, that depends on you!