I am developing a social network for an intranet, and I came across a problem [?]. I have the entities User and Business as main entities of the network.
I\'m trying to find the 10 most recent comments on photos so I can integrate them into an activity feed on my Rails 3.0.3 application.
Our company can have a contract with a person and a company. So the responsible \'party\' of a contract, can be both a person and a company.
I\'m trying to design some database tables to store configuration settings about certain entities and the applications they are associated with.I can get so far but have hit a \"brick wall\".I\'ll sho
What is the correct association for this problem? There are three models: Residents Parties Addresses Each Resident and Party has an Address
Models: class Thread < ActiveRecord::Base has_many :threaded, :through => :threaded, :foreign_key => :thread_id
I\'m using MongoMapper instead of ActiveRecord. I have a User model and a Task model. In the Task model, I have 2 attributes as follow:
I have the following route definition: resources :documents do collection do post :filter end end and the following model structure:
I have a table Foo that has a polymorphic belongs_to association called bar. The foos table has the standard bar_id column. However, instead of a string-based bar_type column, I have an integer bar_ty
I\'m having a difficult time grasping polymorphic associations in Rails. I have two models, Group and User.