views:

214

answers:

1

Hi!

I'm using rails3 edge and mongoid 2beta6 with ruby 1.9.2-head.

How can I manually change the table name, just like set_table_name for ActiveRecord? For example my model Signup should use the table "users" for storage, not "signups".

Another question is how to implement the bevahior of attr_accessible AR provides?

Thanks, Corin

+2  A: 

pretty simple :)

class Pictures
  self.collection_name = 'photos'
end
Thomas R. Koll