Leif
unread,Feb 7, 2012, 7:47:46 AM2/7/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to MongoMapper
Hi
I have a couple of plugins where I used to do this:
module MongoMapper
module Plugins
module TestPlugin
included do
class_attribute :some_field
self.some_field ||= "testfield"
key some_field, Array, :default => [], :index => true
end
end
end
end
I cannot seem to figure out a proper way to define indexes in plugins,
as both the field name and the model name depends on where the plugin
was included.
Any tips?
Thanks,
Leif