Plugins - Enumerated Columns

StarAdd to favorites

enum-column

This plugin is an ROR extension to support enumerations in the database schema using the enum type in MySQL or column constraints in other databases.

This makes it very easy to implement and maintain controlled vocabularies in the database schema without having to change the validations and the view. I have made an effort to make the modifications without modifying the core classes, but I have not been extreamly successful. I have had to make some modifications that are version dependent and then put some exception handlers to make the backward compatible.

ActionView helpers are provided to produce selects and radio buttons automatically. ActiveRecord validates_column has been added to check column against legal values as well, schema generation is also included using :limit to specify a list of values for the constrained column.

Currently enum-column supports MySQL and Postgres.

William Sobel

http://enum-column.rubyforge.org/

svn://rubyforge.org/var/svn/enum-column

Rails' (MIT)

  • Currently 4.0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Model

Tags

Comments

Add a comment

Search Plugins

Query syntax

Plugins by Category

Sponsors

Rails Kits: Get Code. Get Moving.

Have a comment?