Refactor
:my
=>
'code'
Codes
Refactorings
Popular
Best
Submit
Spam
Account
Logout
Login
JavaScript doesn't seem to be activated, expect things to be ugly and sloppy!
Learn How to Create Your Own Programming Language
createyourproglang.com
Recent
ALL FILE HOST PREMIUM ACCOUNTS
Zynga Slingo Trainer v5.12
iTunes Gift Card Generator V3.1 2012
Diablo 3 GOLD Coins FREE
Working PS3 Jailbreak 3.65 And 3.66
ExtaBit Premium Accounts and Cookies
Steam Wallet Hack - Money Adder & Hack v3
Empires & Allies Hack Cheat Trainer v5.4.1
Eve Onnline 60 Days Time Card Generator v2
Xbox Lve Generator v3
Popular
XBOX POINTS GENERATOR - MICROSOFT POINTS GENERATOR v1.2012
11 may 2012 premium uploading accounts 100% working
Free Microsoft Points
Free Microsoft Points - Microsoft Points Generator - Xbox Live Codes 2012
Car Town Free Blue Points Hack
Free CarTown Blue Points Generator and CarTown Templates
Better way to get content via jQuery $.get()
Free Microsoft Points
Simple Days Purger
Sharecash Downloader Bypass Surveys New 05/2012
Pastable version of
Help generating abbreviation from string
<pre class='prettyprint' language='ruby'>class Race < ActiveRecord::Base before_validation :set_abbreviation # Associations has_one :employee # Validatioins validates_presence_of :name, :abbreviation validates_uniqueness_of :name, :abbreviation protected # The method will generate an unambiguous abbreviatioin from the model's name attribute and assign it to the models abbreviation attribute def set_abbreviation name = self.name.to_s strnlength = name.size while strnlength >= 3 do chop.name strnlength = name.size end if name.size == 3 self.abbreviation = name.capitalize else raise "While loop failed to produce a viable abbreviation" end end end</pre> <a href="http://www.refactormycode.com/codes/277-help-generating-abbreviation-from-string" style="color:#fff" title="As seen on RefactorMyCode.com"><img alt="Small_logo" src="http://www.refactormycode.com/images/small_logo.gif" style="border:0" /></a>