There are lots of features in Rails that make you think “yeah, I really have wanted just that”. Often, it isn’t that you couldn’t get the same affect in [insert your favourite web framework here], but you got it as a hack.
One of the small features that made me smile was the flash that Rails has.
As Dave mentions in his new, excellent, Rails book:
The contents of the flash are available to the next request in this session before being deleted automatically.
You just access the flash in your controller a la:
flash[:error] = “Doh. I thought I saw a pussy cat”
and then in the view simply:
<% if @flash[:error] -%>Error: <%= @flash[:error] %>
<% end -%>
How nice is it that you can use
-%> to suppress newlines. No more pages of empty lines in your damn voice source (a pain in J/ASP land).
So, sure, you can write a filter to do this stuff, and it is a small thing. But with Rails it is all just there.
Thanks for thinking of me :)