- Online Exam Test Papers | - MCQs[multiple choice questions and answers ] | - Mock Test Papers | - Practice Papers | - Sample Test Papers |

Question:
How do you add Ruby code inside Rails views and have its result outputted in the HTML file?

1.Create an embedded Ruby file (.html.erb) and surround the Ruby code with <% %>.

2. Insert Ruby code inside standard HTML files and surround it with <% %>. The web server will handle the rest.

3. Create an embedded Ruby file (.html.erb) and surround the Ruby code with <%= %>.

4. Put the code in an .rb file and include it in a tag of an HTML file.

Posted Date:-2022-09-17 03:57:58


More MCQS Questions and answers

Search