Topic: Rails Newb Question

I wan to randomize an array and keep in in session, the first time a user visits the site.  Got everything but figuring out how to make the code run the first time a user visits.  Is there a place for this in Rails?

Re: Rails Newb Question

Are you using an authentication plugin?

I'd put a boolean attribute in your user model,  call it first_visit, and initialize it to false.

Then when a user logs in,  check the attribute,  if it's false, run your randomized_array thing,  set first_visit to true, and save the user's record.

Joe got a job, on the day shift, at the Utility Muffin Research Kitchen, arrogantly twisting the sterile canvas snout of a fully charged icing anointment utensil.

Re: Rails Newb Question

Thank you, I'll do just that.