GitHub Sale: sign up for any paid plan this week and pay nothing until January 1, 2009!  [ hide ]

public
Description: Create fake attributes which are stored in serialized hash column
Clone URL: git://github.com/animoto/activerecord-attribute-fakers.git
name age message
file MIT-LICENSE Wed May 28 08:59:55 -0700 2008 initial check-in. added files [nakajima]
file README Sat Sep 13 21:56:57 -0700 2008 Fixed a very important :) typo in the docs [esad]
file Rakefile Wed May 28 08:59:55 -0700 2008 initial check-in. added files [nakajima]
file init.rb Wed May 28 08:59:55 -0700 2008 initial check-in. added files [nakajima]
directory lib/ Tue Oct 21 17:15:30 -0700 2008 Swapping order in which serialized_column= and ... [esad]
directory tasks/ Wed May 28 08:59:55 -0700 2008 initial check-in. added files [nakajima]
directory test/ Wed May 28 08:59:55 -0700 2008 initial check-in. added files [nakajima]
README
Attribute Fakers
===============

The easiest way to store random data in serialized attributes.

Usage
=====

Use the "faker_attributes" class method to specify attributes to be stored in a 
serialized hash column, which is named "metadata" by default. Doing so will create
reader/writer methods for each attribute. These methods retrieve/store data in the 
serialized column.

The serialized column is named :metadata by default, but you can change it using the
serialized_column option.

Example
=======

class User < ActiveRecord::Base
  faked_attributes :color, :language, :something, :serialized_column => :tidbits
end


Copyright (c) 2008 Pat Nakajima, released under the MIT license