collectiveidea / namecase

This URL has Read+Write access

brandon (author)
Mon Jun 16 10:55:19 -0700 2008
commit  f22e9a6734e263b3468fee527c191a94083b911c
tree    24b5fd629bcfbea0a8e42b76212991cdbd583f2b
parent  681dc9c1f004d2875ca8cc4156e454918eae24e5
name age message
file README Loading commit data...
file Rakefile
file init.rb
directory lib/
directory test/
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"