Re: [Rails] Visitors must select their city first. How to approach this?
On 19 March 2012 15:38, Agis A. <corestudiosinc@gmail.com> wrote:
> Hi guys.
>
> I have an app where visitors can see offers in their cities. So a visitor
> must select his city first in order to access the app (much like Groupon,
> using just a cookie though).
>
> How should I approach this? I mean,right now what I'm doing is I have the
> action for the homepage (which lists all offers) and a before_filter applied
> to it, which redirects the user if no cookie is found. Is this the right way
> though?
I would do it using the session rather than a cookie (though the same
thing underneath of course, but more railsey).
Colin
--
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@googlegroups.com.
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.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home