mmith / capitalize

rails3 plugin for automatically capitalize model fields

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Capitalize
================

Small feature for automatically capitalize designed attributes for model before save in rails3 apps


Usage
=======

  class Contact < ActiveRecord::Base
    acts_as_capitalize :firstname, :lastname
  end

Example
========

  c = Contact.create :firstname => 'john', :lastname => 'doe'
  # => returns #<Contact id: 1, firstname: "John", lastname: "Doe", created_at: "2011-03-02 16:03:39", updated_at: "2011-03-02 16:03:39">

Copyright (c) 2011 [mickael mithouard], released under the MIT license

About

rails3 plugin for automatically capitalize model fields

License:MIT License


Languages

Language:Ruby 100.0%