search for: operation_types

Displaying 2 results from an estimated 2 matches for "operation_types".

Did you mean: operation_type
2005 Aug 28
6
ActiveRecord Question
...has_and_belongs_to_many :operations end class Operation <ActiveRecord::Base belongs_to :operation_type, has_and_belongs_to_many :users end class OperationType <ActiveRecord::Base has_many :operations end And I have users, operations, operations_users (join table) & operation_types tables as needed. Now for a given user, I want to fetch all the types of the operations associated with her (OperationType classes). So there is one very inefficient way that goes like this: (suppose user_id holds the user id) user = User.find(user_id) user_operations = user.operations @user_op...
2005 Aug 28
1
Active Record problem
...has_and_belongs_to_many :operations end class Operation <ActiveRecord::Base belongs_to :operation_type, has_and_belongs_to_many :users end class OperationType <ActiveRecord::Base has_many :operations end And I have users, operations, operations_users (join table) & operation_types tables as needed. Now for a given user, I want to fetch all the types of the operations associated with her (OperationType classes). So there is one very inefficient way that goes like this: (suppose user_id holds the user id) user = User.find(user_id) user_operations = user.operations @user_op...