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"} %>
...