Category Archives: Code

Blog Move 1: Getting WordPress data to Ruby using XML

Step 1 in the “Moving my blog” process is “Extract the current site’s data into a manageable format” Frankly, that’s easy! WordPress has a functionality to export the site’s content to a single XML file containing all the published Categories, … Continue reading

Posted in Code, ruby | Tagged , , , | 1 Comment

Ruby on Rails: Get some random records

EDIT AGAIN: Much better.. To get a ‘num_reqd’ array of random objects, you can use something like this. named_scope :large, :conditions => ['image_file_name IS NOT ?', nil] named_scope :small, :conditions => ['small_image_file_name IS NOT ?', nil] def self.get(num_reqd,features_arr=[],size=”large”) if size==”small” … Continue reading

Posted in Code, blog, learning, rails | Leave a comment

Harry Ferguson Memorial CMS choice – Textpattern

The last few days I’ve been putting the finishing touches to the CMS behind Harry Ferguson Memorial.com. Initially completely in hand-coded HTML (to get it looking right without distracting myself hacking around in a CMS template styling system), it was … Continue reading

Posted in Code | Tagged , , , , , | 2 Comments