How to download a dynamically generated file

I need to provide users a link to download an user_guide.txt file.

Currently the user_guide.html.erb looks like this.

Dear <%[email protected] %>,

Please visit <%[email protected]_webiste %> site.

the point is that the file has some variables which needs to be
replaced then user should be able to download these files and use

I can find ways to download a static file but in this case how should
I code such that users are able to download the customized files.


Use render_to_string(options = nil, &block) and use the send_data

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs