0 votes
in Ruby by

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

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

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

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

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

1 Answer

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

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

Related questions

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