I think you want a field on the user to store when the last notice was
sent and check if the time is greater than some interval

subscription.checkSubscription if 2.days.ago > time_last_notified # or
such

On Jun 22, 7:08 am, Pete <[email protected]> wrote:
> I have a User subscription set up, this is a Subscription model set up
> separately.
>
> When the subscription is nearing expiry, I have set up a method
> (checkSubscription) which will mail the user notifying as such.
>
> The method works, and I can view this on the home page,
>
> however, this is not really what I want, as everythime I open the
> homepage, or refresh, the mail will be sent.
>
> Ideally I want to be able to call this method just after login, so It
> will only be called once for that particular session.
>
> either that or be able to call a method in the observer model dpending
> on conditions.
>
> Is there a way of calling something like this from the User
> model.......
>
>  after_login {self.subscription.checkSubscription}   ?
>
> I am not sure where to go from here? Any suggestions?

-- 
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/hobousers?hl=en.

Reply via email to