Module: TentD::Model::TypeProperties
- Included in:
- NotificationSubscription, Post, PostVersion, ProfileInfo
- Defined in:
- lib/tentd/model/type_properties.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/tentd/model/type_properties.rb', line 4 def self.included(base) base.class_eval do property :type_base, DataMapper::Property::Text, :required => true, :lazy => false property :type_view, String property :type_version, String validates_with_block :type_version do return true if type_base == 'all' || type_version [false, 'type version must be set'] end end end |