0 votes
in JUnit by

If the Rails asset pipeline is being used to serve JavaScript files, how would you include a link to one of those JavaScript files in a view?

a. <script src="/main.js"></script>

b. <%= javascript_include_tag 'main' %>

c. <%= javascript_tag 'main' %>

d. <!-- include_javascript 'main' -->

1 Answer

0 votes
by

If the Rails asset pipeline is being used to serve JavaScript files, how would you include a link to one of those JavaScript files in a view?

a. <script src="/main.js"></script>

b. <%= javascript_include_tag 'main' %>

c. <%= javascript_tag 'main' %>

d. <!-- include_javascript 'main' -->

Correct answer is :-  <%= javascript_include_tag 'main' %>

Related questions

+1 vote
asked Aug 18, 2019 in MVC Language by sheetalkhandelwal
0 votes
asked Oct 24, 2019 in Interview Question by AdilsonLima
...