collectiveidea / namecase
- Source
- Commits
- Network (0)
- Issues (0)
- Downloads (0)
- Wiki (1)
- Graphs
-
Branch:
master
commit f22e9a6734e263b3468fee527c191a94083b911c
tree 24b5fd629bcfbea0a8e42b76212991cdbd583f2b
parent 681dc9c1f004d2875ca8cc4156e454918eae24e5
tree 24b5fd629bcfbea0a8e42b76212991cdbd583f2b
parent 681dc9c1f004d2875ca8cc4156e454918eae24e5
namecase /
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"
