0 votes
in Ruby by

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

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

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

 c. Put the code in an.rb. file and include it in a <link> tag of an HTML file.

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

1 Answer

0 votes
by
How do you add Ruby code inside Rails views and have its result outputted in the HTML file?

 Correct answer is :-  Create an embedded Ruby file (.html.erb) and surround the Ruby code with <%= %>.

Related questions

0 votes
asked Sep 2, 2022 in Ruby by DavidAnderson
0 votes
asked Sep 3, 2022 in Ruby by DavidAnderson
...