I''ve never had to do this before, but I would try it as follows:
1. Store the zip file outside of your public directory. The user then
must access the file via the controller action you specify.
2. Create a controller action somewhere (FileDownloadController?) that
handles the actual downloading of your file using the
ActionController::Streaming#send_file method.
3. Create other controller actions somewhere (EulaController) for display
and acceptance of your EULA. The acceptance action should specifically set
some state in the user''s session (or in a cookie, if you want to
remember
that the user accepted the terms between sessions) that indicates that he
passed this part of the process.
4. Go back to the original controller used for file download. Create a
before_filter that checks for the state you just set before allowing the
user to execute the download action. If it is not found, the user should be
redirected to the EULA display page.
Some variation on that process should get you what you want.
HTH.
On Thu, Mar 24, 2011 at 3:27 AM, Ralph Shnelvar
<lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org>wrote:
> I have a zip file I want to give my users.
>
> But first I need for them to agree to a End User License Agreement
> (EULA).
>
> I can''t think of any way to prevent them from going to the
download link
> and getting the file without agreeing to the End User License Agreement
> first.
>
> Any suggestions?
>
> --
> Posted via http://www.ruby-forum.com/.
>
> --
> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To unsubscribe from this group, send email to
>
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>
--
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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.