Can\'t find out why I\'m getting this when trying to upload files with Mongoid and Paperclip. undefined method `metadata\' for #<ActionDispatch::Http::UploadedFile:0x10625e930>
I\'ve been struggling to create a form for a Mongoid model that has an array field. I want my form to have on text box per entry in the array. If I\'m creating a new record, the default will be one em
I\'m using the latest mongoid... How do I do the mongoid equivalent of this active record named_scope:
The \"ask to answer\" feature on quora is a similar technical issue to the one i am facing. Essentially, one user(suggester) asks another user(suggested) to answer a question(question).
I\'m using Mongoid to work with MongoDB. Everything is fine, I like it very much and so on. In my blog application (posts controller, index action) I have this code:
Post is accessible via Blog.first.posts How do I do this with a module name space? Such as 开发者_运维知识库Engine::Post
In episode 189 of Railscasts, there is a named scope in the User model which is as follows: field :roles_mask,:type => Integer
I\'m trying to include a module only when a condition is met. module PremiumServer def is_premium 开发者_如何学Ctrue
I need to store an unordered list of IDs in mongo as a \"blacklist\", and use them purely for checking reasons.
A large array of objects gets initialized (Photo.new). Some filtering is done to the Photo array, so 30% of them remains.