search for: find_users_to_notify

Displaying 1 result from an estimated 1 matches for "find_users_to_notify".

2006 Feb 04
6
Best practice: "reaching" through many tables?
...eferred" way to handle this? * No, dot-script notation through three tables is fine? * Write a custom find method in model "notifications" so that you can just ask that model for notifications, rather than doing things the hard way in the controller? Class Notification def self.find_users_to_notify(cover, event) [big ol'' "find_by_sql" left join find goes here] end end Then my code could be like this: for each user in Notification.find_users_to_notify( cover, "warning" ) * Something else that will cause me to slap my forehead? Thanks for any advice! Right...