What is the "key" attribute keyword for in rails? -


in diaspora, there class includes code below, can't find documentation on "key" keyword or how used. help? thanks!

person.rb

class person    #omitted clarity    key :url,     string    key :diaspora_handle, string, :unique => true    key :serialized_key, string #public/private key pair encryption.    key :owner_id, objectid #extraordinarily security sensitive because...     1 :profile, :class_name => 'profile'    many :albums, :class_name => 'album', :foreign_key => :person_id    belongs_to :owner, :class_name => 'user' #... changing reassigns account ownership! end  

diaspora uses mongodb instead of sql database. such, instead of using activerecord uses mongomapper. models declared differently.

http://mongomapper.com/

https://github.com/jnunemaker/mongomapper


Comments