[Jifty-commit] r2105 - Jifty-DBI/trunk/lib/Jifty/DBI
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Wed Nov 1 16:58:31 EST 2006
Author: falcone
Date: Wed Nov 1 16:58:30 2006
New Revision: 2105
Modified:
Jifty-DBI/trunk/lib/Jifty/DBI/Schema.pm
Log:
demonstrate the valid_values alternate syntax that allows display and value to be separate
Modified: Jifty-DBI/trunk/lib/Jifty/DBI/Schema.pm
==============================================================================
--- Jifty-DBI/trunk/lib/Jifty/DBI/Schema.pm (original)
+++ Jifty-DBI/trunk/lib/Jifty/DBI/Schema.pm Wed Nov 1 16:58:30 2006
@@ -407,6 +407,14 @@
generate the user interface. Correct usage is C<valid_values are
qw/foo bar baz/>.
+If you want to display different values than are stored in the DB
+you can pass a list of hashrefs, each containing two keys, display
+and value.
+
+ valid_values are
+ { display => 'Blue', value => 'blue' },
+ { display => 'Red', value => 'red' }
+
=cut
sub valid_values {
More information about the Jifty-commit
mailing list