Warning: Creating default object from empty value in /homepages/39/d161420129/htdocs/p373.net/wp/wp-content/themes/p373b/admin/functions.php on line 183
Global Technology, Activism, Philosophy, Photography.

Monthly Archives: June 2013

Carrierwave custom validations

The use case here is when you need to conditionally validate the extensions you validate.  In our case, we only wanted to validate the extension white list when a local file was uploaded.  This is because our users can signup via Yammer during which we suck in their mugshot images.  Yammer’s mugshot urls do not […]

Posted in Coding, Ruby/Rails, Technology | Tagged , | Comments closed

Forget pretty urls, how about vain gorgeous urls

In Rails, resource based urls are by default not pretty.  For example, say you have the following routing resources :projects do resources :users end This yields urls /projects /projects/1 /projects/1/users /projects/1/users/1 So to make pretty urls, its pretty trivial.  Just implement #to_param on the project model and user model #app/models/project.rb class Project < ActiveRecord::Base … […]

Posted in Coding, Ruby/Rails, Technology | Comments closed

Beginner’s electronics soldering project: Led Origami Flower

Led Origami Flower

Ok, so its been some time since I’ve done any soldering, so I figured I start with a small attainable project before I move on to my project of building a cigar box speaker(http://blog.makezine.com/projects/make-34/monobox-powered-speaker-2/). Since I ordered some parts from Jameco, I went with their LED Origami Flower project as my starter project. So, the premise […]

Posted in Electronics, Projects, Technology | Comments closed