public
Clone URL: git://github.com/collectiveidea/namecase.git
name age message
file README Thu May 01 20:08:56 -0700 2008 define #namecase instead of using #titleize, wh... [brandon]
file Rakefile Thu Oct 05 09:22:18 -0700 2006 namecase plugin [brandon]
file init.rb Thu May 01 20:08:56 -0700 2008 define #namecase instead of using #titleize, wh... [brandon]
directory lib/ Mon Jun 16 11:01:28 -0700 2008 add destructive String#namecase! [brandon]
directory test/ Thu May 01 20:08:56 -0700 2008 define #namecase instead of using #titleize, wh... [brandon]
README
Namecase
========

This is a trivial plugin that tries to fix the case of a string if it is given a string that is all caps or all lower 
case

  class Person < ActiveRecord::Base
    namecase :first_name, :on => :create
  end
  
  >> Person.create(:first_name => 'larry').first_name
  => "Larry"
  >> Person.create(:first_name => 'ANNOYING').first_name
  => "Annoying"