Categories: None [Edit]
values_for
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.
Total
Ranking: 70,342 of 183,477
Downloads: 12,629
Daily
Ranking: 63,432 of 183,470
Downloads: 0
Downloads Trends
Ranking Trends
Num of Versions Trends
Popular Versions (Major)
Popular Versions (Major.Minor)
Depended by
Rank | Downloads | Name |
---|
Depends on
Rank | Downloads | Name |
---|---|---|
7 | 1,004,546,968 | activesupport |
35 | 604,924,275 | activerecord |
Owners
# | Gravatar | Handle |
---|---|---|
1 | jsl |