search for: starts_in

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

2006 Apr 07
2
Access instance variables from model?
Can I make my model methods aware of the context (preferably instance variables) where they are run, without having to pass them arguments? The app in question should be time zone aware, so something like user.events[0].starts_in should check against @logged_in_user.now rather than Time.now. I could send the user as an argument (user.events[0].starts_in(:timezoned => @logged_in_user)), but there are a number of methods where this applies, and it seems more DRY to just read it from the context. I do realize this mig...