Sha256: 7736af975d2749fc2ff371b28d98e3dfeb0775bf2f1868a42140a076975186be
Contents?: true
Size: 1.08 KB
Versions: 4
Compression:
Stored size: 1.08 KB
Contents
module Tweetable class Collection < Persistable attribute :created_at attribute :updated_at attribute :name # super class attributes don't get picked up in subclasses for some reason index :name def validate assert_present :name assert_unique :name end end class UserCollection < Collection attribute :created_at attribute :updated_at attribute :name index :name set :user_set, User list :users, User end class MessageCollection < Collection attribute :created_at attribute :updated_at attribute :name index :name set :message_set, Message list :messages, Message end class SearchCollection < Collection attribute :created_at attribute :updated_at attribute :name index :name set :search_set, Search list :searches, Search end class LinkCollection < Collection attribute :created_at attribute :updated_at attribute :name index :name set :link_set, Link list :links, Link end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
tweetable-0.1.14 | lib/tweetable/collection.rb |
tweetable-0.1.13 | lib/tweetable/collection.rb |
tweetable-0.1.11 | lib/tweetable/collection.rb |
tweetable-0.1.10 | lib/tweetable/collection.rb |