Archive for the ‘Uncategorized’ Category
Factory Farming Possibility in NZ
Get the full story and how to oppose the factory farming
In: Uncategorized
Attachment_fu file upload from local files
If you need to batch import files into attachment_fu from a local source then you can doing the following
l = Logo.new(:uploaded_data => ActionController::TestUploadedFile.new(“/home/jordan/Documents/test_project/1.jpg”, “image/jpeg”))
You can encapsulate that in a loop and iterate over a list of files if need be (would be assumed for batch import eh.) Enjoy!
In: Uncategorized · Tagged with: attachment_fu, batch import, file upload
Rails Filters Order
Rails has some nice filters for DRYing up repeated actions like creating a activation_code on signup, or an unsubscribe_code, reset code.
before_validation_on_update
before_validation_on_create
validate
validate_on_update
validate_on_create
after_validation
after_validation_on_update
after_validation_on_create
before_save
before_update
before_create
after_update
after_create
after_save
There are many different times when you will want to use these and knowing the order will help a lot in terms of unnessacry debugging. Like I did today!
Just to note that update and create [...]
In: Uncategorized · Tagged with: DRY, filters, Rails
Microsoft Surface – hidden agenda
Microsofts’ Surface technology looks rather cool. A good step for innovation from Microsoft but there is something that strikes me as a little fishy.
It’s not that this technology could be installed in every surface and watch our every move. The pub, the breakfast table, my work desk, the floor…
Nor is it that this [...]
In: Uncategorized · Tagged with: Microsoft Surface, SilverLight
Boot Windows 7 RC – win7 – From USB Thumb Drive
A very good blog post here about how to do it http://kmwoley.com/blog/?p=345
Here is a recap, you must be in Vista or another Win 7 install. I used a virtualbox install to do the formatting, then copied the iso files across inside of ubuntu.
Step 1: Format the Drive
The steps here are to use the command line [...]
In: Uncategorized
