Say I'm modeling Students, Lessons, and Teachers. Given a single student enrolled in many lessons, how would I find all of their teachers of classes that are level 102? For that matter, how would I ...

I got the error if I remove the database.yml
ails/application/configuration.rb:105:in `database_configuration': Cannot load `Rails.application.database_configuration`: (RuntimeError)
Could not load ...

I have two fields namely cost and var_cost both of type Integer, User can enter a number in the text field, on submit the number will be updated for the cost field for multiple records, but var_cost ...

I have a mongoid model named Person with an updated_at DateTime field.
I want to query from Person and then group_by the dates (not datetimes) of updated_at, therefore I want to select from Person the ...

I want to show all the post which only related to all of the subject of the user.
I have tried and tried but I'm always getting error. It's too confusing because it has a lot of relation for me. Here ...

I'm at a loss to why Mongoid is creating a new record in an association. I'm stepping closely through the code, but I've never seen anything like this. I've made a test and slimmed down the code. I ...

I try to save datetimes into events in MongoDB with Mongoid. The difficulty is that I want to save them for different timezones (e.g. Berlin and London). I want the user (admin) to see the actual time ...

I want to model student's attendance, i am following railscast.com/165-edit-multiple-revised i follow Ryan's first approach and try to use it with mongoid. My modified code is as follows but it does ...

I currently have a problem with a system I am building. I have a model named company and a model named team (user is also available, but not important for this topic I think).
My team model includes ...

Suppose I have a model by the name of ItemAvailability that have a product_id , vendor_id, shop_id
I would like to group_by on product_id and select all those product_id that have distinct(vendor_id) ...

I am having multiple issues getting locomotivecms-search to run.
First one is that after I have added the locomotive-search gem and ran the install with the bundler which has installed the gem, I do ...