Flowdock
method

local_assigns

Importance_1
Ruby on Rails latest stable (v6.1.7.7) - 0 notes - Class: ActionView::Template
local_assigns public

Returns a hash with the defined local variables.

Given this sub template rendering:

<%= render "shared/header", { headline: "Welcome", person: person } %>

You can use local_assigns in the sub templates to access the local variables:

local_assigns[:headline] # => "Welcome"
Show source
Register or log in to add new notes.