pluginaweek / enumerate_by

Adds support for declaring an ActiveRecord class as an enumeration

This URL has Read+Write access

enumerate_by / README
100644 49 lines (28 sloc) 1.223 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
= acts_as_enumeration
 
+acts_as_enumeration+ adds support for declaring an ActiveRecord class as an
enumeration.
 
== Resources
 
Announcement
 
* http://www.pluginaweek.org
 
Wiki
 
* http://wiki.pluginaweek.org/Acts_as_enumeration
 
API
 
* http://api.pluginaweek.org/acts_as_enumeration
 
Development
 
* http://dev.pluginaweek.org/browser/trunk/plugins/active_record/acts/acts_as_enumeration
 
Source
 
* http://svn.pluginaweek.org/trunk/plugins/active_record/acts/acts_as_enumeration
 
== Description
 
Support for enumerations is dependent on the type of database you use. For
example, MySQL has native support for the enum data type. However, there is
no native Rails support for defining enumerations and the associations between
it and other models in the application.
 
acts_as_enumeration adds support for enumerations in Rails by providing methods
for interacting with records in a table as if they were values in an
enumeration.
 
See the API for usage examples.
 
== Testing
 
Before you can run any tests, the following gem must be installed:
* plugin_test_helper[http://wiki.pluginaweek.org/Plugin_test_helper]
 
== References
 
Trevor Squires - enumerations_mixin[http://svn.protocool.com/rails/plugins/enumerations_mixin]