Natknalem sie na tak oto zdefiniowany problem.
The goal of this project is to make a request at this URL and have it show a completed proposal:
http://localhost:3000/proposal_viewer/show/1
Once the user accesses the above URL an HTML template found in the public directory will be retrieved and
populated with data from several models.
For the purposes of this example,
assume that the HTML template is user generated and stored in this public directory.
This means that the HTML file must be left exactly as is and cannot be modified or have <%=%> tags within.
Important:
- You cannot add any files to the folder containing the index.html
- You cannot modify any of the files in the folder containing the index.html
Fragment pliku z szablonem:
{client_name}
{proposal_name}
Zastanawiam sie czy przychodzi Wam do glowy rozwiazanie inne niz:
- wez plik z templatem
- otworz go w jakims jQuery po stronie serwera (Nokogiri etc.)
- podstaw zmienne/wartosci w templacie
- zwroc jako html
Pozdro, dzieki