search for: user_operations

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

Did you mean: seq_operations
2005 Aug 28
6
ActiveRecord Question
...s_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_operation_types = Array.new for op in user_operations operation_type = op.operation_type if !@user_operation_types.include? operation_type @user_operation_types << operation_type end end And I get all the operation types associated with the...
2005 Aug 28
1
Active Record problem
...s_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_operation_types = Array.new for op in user_operations operation_type = op.operation_type if !@user_operation_types.include? operation_type @user_operation_types << operation_type end end And I get all the operation types associated with the...