Laptops are complicated wee beasties!

Last night when I went to bed my new (to me anyway) Powerbook G4 was working fine. This morning when I got up it was severely misbehaving - there was 9.5gb of RAM in use and nothing was responding. I started shutting everything down and at one point tried to turn off the local ColdFusion 8 server using sudo, only to have an error that my account wasn't in the sudoers list; given that my account was an administrator, this was not good. I left it to continue rebooting but when I got back, a half hour later, it had pretty much frozen up trying to load a few starter apps. This, along with the noise coming from the drive, told me what I already knew - the drive was dead.

Tags: 

Bug in Safari 3 beta: hidden file fields don't get submitted

I've just wasted several hours due to what turned out to be a bug in the current Safari 3 beta (on OSX Tiger). If you have a form with some DIVs set to display:none;, any file fields that are in the hidden DIVs do not get submitted along with the rest of the data, whereas text fields are submitted. This inconsistency does not exist in Firefox 2 - it submits all of the available fields. Bad Safari, bad!

Tags: 

Reminder - rails forms with file uploads

Just a quick reminder for myself: if you're doing a form that is uploading files, remember to add :multipart => true to the form tag, e.g.:
[source:ruby]
< % form_for(:product, :url => products_path(@product), :html => {:multipart => true, :method => :put }) do |f| %>

< %= f.file_field :photo %>

< % end %>
[/source]

Tags: 

Pages

Subscribe to Front page feed