github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

dcrec1 / activerecord_i18n_defaults

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 39
    • 3
  • Source
  • Commits
  • Network (3)
  • Issues (0)
  • Downloads (0)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (1)
    • master ✓
  • Tags (0)
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

Common attributes translations for Rails 2.2+ — Read more

  cancel

http://www.diegocarrion.com

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

Fixing repository url 
tapajos (author)
Fri Jun 12 15:29:37 -0700 2009
dcrec1 (committer)
Fri Jun 12 16:09:27 -0700 2009
commit  d009f066a743370924a60718f71acee1e6292963
tree    319ec64db06700858b14fca34ad05b92c9d058c1
parent  6e301e78ef988316f04b96d0394b04ceb6afa227
activerecord_i18n_defaults /
name age
history
message
file README.textile Fri Jun 12 16:09:27 -0700 2009 Fixing repository url Signed-off-by: Diego Car... [tapajos]
file Rakefile Tue Nov 25 10:48:35 -0800 2008 first commit [Diego Carrion]
file init.rb Tue Nov 25 10:48:35 -0800 2008 first commit [Diego Carrion]
directory lib/ Fri Mar 27 10:34:03 -0700 2009 Adapting to Rails 2.3.2 Signed-off-by: Diego C... [uchoaaa]
directory spec/ Mon Dec 01 05:07:15 -0800 2008 work is done at human_attribute_name method now [Diego Carrion]
README.textile

DESCRIPTION

ActiveRecord i18n Defaults is a Rails 2.2 plugin that lets you define translations for common attributes used in more that one model.

INSTALLATION

Install the plugin from your Rails project root:

script/plugin install git://github.com/dcrec1/activerecord_i18n_defaults.git

USAGE

Define your ActiveRecord default attributes like this:

en-US:
  activerecord:
    attributes:
      _all:
        login: "Login"
      admin:
        login: "Custom Login"
      user:
        name: "Name"

Then use the I18n API as usual. If an attribute for a model is not found, it will be searched in _all atributes.

License

Copyright © 2008 [name of plugin creator]

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
“Software”), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server