RubyGems Navigation menu

values_for 0.0.9

values_for makes your ActiveRecord-backed class work with an enumerable type. Instead of existing ActiveRecord plugins such as enum_fu, which store the enumerable attribute as an integer, values_for stores the content of the enumerable attribute in a varchar column of the database. The field will automatically validate using validates_inclusion_of and accepts all the same options. values_for will also optionally create named scopes, predicate methods, and constants defining the possible values for enumerable types on your model. By default, however, it avoids polluting your model with things you may not need unless these features are specifically requested.

Gemfile:
= 複製 已複製

安裝:
=

版本列表:

  1. 0.1 - October 28, 2010 (9.5 KB)
  2. 0.0.9 - October 28, 2010 (9.5 KB)

Runtime 相依性套件 (2):

擁有者:

作者:

  • Justin Leitgeb

SHA 256 checksum:

f865fa93e4f6a0c75545408e215200b8e705e161e0718872bfcaff2f4b62d4ea

總下載次數 12,414

這個版本 3,174

License:

Ruby 版本需求:

相關連結: