Any suggestions?
On Jul 17, 9:36 am, shenry
<stuarthe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> Hi,
>
> I''m building a little app that tracks shipments - each user is
> associated with a role and that role has_many shipments.
>
> I''d like to add a feature that displays new shipments since the
user''s
> last login. Here is my guess at an implementation:
>
> * create a column in the users_table last_login that timestamps the
> users last login (duh)
> * when the user logs in, the previous last_login is saved to a
> variable (instance? attr_accessor?) then overwritten with the current
> login timestamp
> * @unseen_shipments = Shipments.find(:all, :conditions =>
["created_at
>
> > ?", last_login])
>
> All advice and criticism is welcome.... thanks!
>
> SH
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---