Re: Age Verify

Ryan Bigg
2007-12-22T09:25:38Z

Put it in the check action, so it''s set when they go to that page.

On Dec 22, 2007 7:54 PM, edberner
<eberner-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:

>
> Sorry about that.
> I thought I had had it well explained.
> The problem is I don''t know where to set session[:checked] for
when we
> know the user has been to the check page. Setting it in the view seems
> to not be functional, as does throwing a method into the helper. This
> is the functionality I want:
>
> ApplicationController
> before_filter :adult?
> def adult?
> session[:adult] == true
> end
>
> def adult # a method from a form on the page that sets the
> session[:checked] (just makes sure the user has in fact been to that
> page
>
> if session[:checked] == true # how do i set this to *be* true?????
> session[:adult] = true
> end
>
>
>
> On Dec 22, 4:12am, "Ryan Bigg"
<radarliste...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> > Jesus!
> >
> > Could you explain your problem a little more, possibly with less
> bumping.
> > On Dec 22, 2007 7:01 PM, edberner
<eber...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> >
> >
> >
> > > bump bumpity
> >
> > > On Dec 21, 1:40am, "Ryan Bigg"
<radarliste...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> > > > What is preventing it? Whatever code you write for it. You
didn''t
> say
> > > > anything about wanting to protect that action.
> > > > You could store another session variable on the previous
page which
> says
> > > > that they visited that page before they visited the adult
page.
> Check to
> > > see
> > > > if the variable is set before setting adult to true and
forwarding
> them
> > > on.
> >
> > --
> > Ryan Bigghttp://www.frozenplague.net
> >
>


--
Ryan Bigg
http://www.frozenplague.net

--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org