0 votes
in Ruby by

Q1. When rendering a partial in a view, how would you pass local variables for rendering?

 a. <%= render partial: "nav", selected: "about"}%>

 b.<%= render partial: "nav", local_variables: {selected: "about"} %>

 c. <%= render partial: "nav", locals: {selected: "about"}

1 Answer

0 votes
by
Q1. When rendering a partial in a view, how would you pass local variables for rendering?

 

 Correct answer is :-  <%= render partial: "nav", locals: {selected: "about"}

Related questions

0 votes
asked Sep 2, 2022 in Ruby by DavidAnderson
0 votes
asked Aug 26, 2022 in Ruby by Robin
...