Last night I presented a skillswap, “Introduction to Rails”. This was meant to be a fairly quick overview for people who’ve done some web development before, but are completely new to Rails (and Ruby). The event was presented in two parts. First, a set of slides about what Rails is, why it [...]
I suddenly noticed that my last entry had Unicode problems. How embarrassing. It turns out that mongrel doesn’t set a default charset, so the usual caveats apply. Looking through the mongrel docs, you can do something with the -m option, but it still seems difficult to apply a default universally.
Thankfully, I’m proxying [...]
Unicode in Rails takes a step further today, as ActiveSupport::MultiByte is committed to the edge (r5223). More information is available over at fingertips, including a neat demo video. This should really help people who need proper Unicode support. There’s no excuse to not use UTF-8 now!
I want to write a Rails plugin, which adds a controller to a rails app. It seems like it should be easy, plugins are fairly flexible after all. After a couple of experiments, I concluded that you need at least the following defined in your plugin:
lib/foo_controller.rb
1
2
3
4
5
class FooController < ActionController::Base
[...]
I’m really happy to see that Thijs has just pointed out that the unicode_hacks plugin is undergoing further development:
We’re almost ready with a new version of Julik’s ‘Unicode Hacks’ that’s now called ‘ActiveSupport::Multibyte’. You can find more information and code on the ‘Multibyte for Rails’ project site.
I’m particularly pleased to see that: “We hope [...]
Working round the Rails showstopper.
(pdcawley)++
(svk)++
I now have the fixed version of typo (soon to be 4.0.2), around an hour after it was committed.
As to the whole “full disclosure” thing by the rails team? They handled it pretty badly. As somebody else commented, it didn’t work for OpenBSD a while back and if anybody [...]
I had a little note today to say that my talk on “Unicode for Rails” has been accepted for RailsConf Europe 2006. Yay!
Now I have to write the thing. This is going to be interesting. I have only a few weeks to go, and most of those weekends are already taken…
My first rails plugin: timed_file_store is now available. It lets you expire fragments based upon the time of the cached file. It’s fairly easy to use; just bung this into config/environments.rb:
ActionController::Base.fragment_cache_store =
TimedFileStore.new(”#{RAILS_ROOT}/tmp/cache”, :atime => 15.minutes)
And now any fragments which haven’t been accessed in the last 15 minutes [...]
I’ve been looking at Rails’ fragment caching recently. I want to cache some stuff in my view that’s more or less independent of my model (eg: output from some slow command like top). That’s fine, and easily done.
<% cache do %>
<%=h `top` %>
<% end %>
The [...]
I’ve finally bit the bullet and upgraded Typo to the trunk, so I can get everything up to Rails 1.1. Unfortunately, this was quite a painful process…
Normally, I track bits of software I might want to hack on in a vendor branch in subversion, and use svn_load_dirs.pl to update to new releases. This [...]