I\'m trying to create an app where users (\'current_user\') rate the compatibility between two other users (\'user1\' and \'user2\'). They can rate compatibility either positively or negatively: ratin
This is my first post here, so I hope everything is fine. Here is my problem: I have a table in my database called UserTypes. It has:
I have defined a method called ccy which takes in a number num, determines the currency (an attribute of the parent Record model) and returns the number multiplied by a conversion factor. Self, in thi
I\'m working on a contact database in rails 3.. One thing thats really frustrating is how ugly the family relationship code is..
Here\'s my User model: class User < ActiveRecord::Base has_many :friends, :class_name => \'Friendship\', :dependent => :destroy
I have something link this: public abstract class Wrapper<T, TWrapped>: where TWrapped : Wrapper<T, TWrapped>
I have a self referencing table and I want a mysql query that will return only the top most parent (parent = 0) and the number of children belonging to each of those. This is what I have so far, but I
This question already has answers here: Why can't we initialize members inside a structure? (6 answers)
I encountered a very strange problem with SQLAlchemy. I have a model that is self-referencing (adjacency list relationship). I simply copied the model (Node) from the SQLAlchemy tutorial. Here is the
I read the documentation several times. This is table structure: categories: id controller user_id approved enabled_comments