Posterous
The Net Duck is using Posterous to post everything online. Shouldn't you?
Banner_thumb
 

feel the chi

Neat stuff about programming and technology

I found this great template for creating a simple rails app

If you don't know what Rails Templates are, they are pretty much a way of generating rails code the way you want it to be generated. For example, you find yourself "always" doing the same thing over and over again to set up your authentication, a template will automat that task for you. This guy created what I think is a pretty good one

 

http://github.com/hectoregm/groundwork

 

- The Net Duck

Loading mentions Retweet
Posted March 6, 2010
// 0 Comments

Best game ever! I can't stop playing

be careful, it will waste your time

 

http://games.adultswim.com/robot-unicorn-attack-twitchy-online-game.html

 

- Ya...

Loading mentions Retweet
Posted March 4, 2010
// 0 Comments

Make Ruby on Rails select_tag stick

I spend a couple hours yesterday trouble shooting a very minor bug in my code that had be grinding my teeth. This was the link of code

Hidden: </label><%= select_tag :hidden, options_for_select({'No' => 0, 'Doesn\'t Matter' => -1 ,'Yes' => 1}, params[:hidden]) %>

The problem here, was the last part of this code "params[:hidden] should be setting the default correctly every time the page is called again. The problem is, the contents of params[:hidden] is in string format while it should be in int format. This is an easy fix all you have to do is something like ....

params[:hidden].to_i

And your done. So in conclusion, pay attention to your data types! Ruby doesn't always handle eveything for you.

 

- The Net Duck

 

Here is the funished line that works.

Hidden: </label><%= select_tag :hidden, options_for_select({'No' => 0, 'Doesn\'t Matter' => -1 ,'Yes' => 1}, params[:hidden].to_i) %>

Loading mentions Retweet
Filed under  //   programming  
Posted March 2, 2010
// 0 Comments

Hey this isn't bad

I'm posting this from my email. I think I like this idea. Very nice. Everyone should check out posterous.com I wonder how they are going to format this photo.

Loading mentions Retweet
Posted March 1, 2010
// 1 Comment

My First Blog Post

Hey this is just a test

Loading mentions Retweet
Posted March 1, 2010
// 0 Comments