[typo] Problems with upgrade

Esteban Manchado velázquez ruby-forum-incoming at andreas-s.net
Sat Aug 9 06:18:16 EDT 2008

Anton Aylward wrote:
> Esteban Manchado vel�zquez said the following on 07/08/08 04:40 PM:
>> Sorry for the noise, I panicked for a moment because I didn't want 
>> anyone to lose data because of my solution :-)
> I'm sorry, after your 'panic' I deleted the previous messages.
> Could you repeat that slowly, please....

Haha, sorry. The solution I posted in the first place works without 
problems (in my case anyway), it was a false alarm.

So, what you have to do is: (1) open the console (in production 
environment or
whatever other environment you're using for your blog) and (2) remove 
sidebars that have undefined "type" (= nil). This line should do:

Sidebar.find(:all, :order => 'active_position ASC').find_all {|s|
s.type.nil?}.each {|s| s.destroy}

That line could be simpler, and you may want to have a look and the 
sidebar items you have in the database (in particular, the ones with 
type = nil) before changing anything. Apart from that, it should work.

In any case, make sure you have a backup of your database. Just in case.
Posted via http://www.ruby-forum.com/.

More information about the Typo-list mailing list