focused_controller
focused_controller copied to clipboard
Instance variables not available in template
Instance variables set in call are not available in template.
module FooController
class Bar < Action
def call
@foo = 'foofoo'
end
end
end
bar.html.erb
<%= @foo.inspect %>
Outputs 'nil'.
Any comments/news on that?
I believe using instance variables to share data to the view is another "wart" / design decision that this project doesn't agree with and adds another boundary.
Use expose as explained in the README ?