You are here: Browse Railsplugins Model Formatter
Location: United States, Chicago, IL
== Overview The ModelFormatter module allows you to easily handle fields that need to be formatted or stripped of formatting as they are set or retrieved from the database. You can designate one or more of your columns as “formatted columns” like in this example:
class Widget < ActiveRecord::Base
# Set an integer field as a symbol
format_column :some_integer, :as => :integer
end
...
The methods of this module are automatically included into ActiveRecord::Base as class methods, so that you can use them in your models.
Documentation For more detailed documentation, create the rdocs with the following command:rake rdoc
Running Unit Tests By default, the ModelFormatter plugin uses the mysql test database, running on localhost. To run the tests, enter the following:rake
Bugs & Feedback Please file a bug report at http://bfolkens.lighthouseapp.com/projects/14691-model-formatter Credits Sebastian Kanthak’s file_column plugin – used for ideas and best practices.NOTE: This description has been extracted from the Plugin README and so the formatting may need updating to make browser friendly
Homepage: http://brad.folkens.com/formatting-data-in-rails-models