Skip to content

Replace defined? in views with local_assigns

gitlab-qa-bot requested to merge github/fork/cirosantilli/rm-defined-views into master

Created by: cirosantilli

local_assigns is the right way to do it: http://stackoverflow.com/questions/2060561/optional-local-variables-in-rails-partial-templates-how-do-i-get-out-of-the-de

One occurrence, defined?(snippet[:start_line]), is a bug, since a = {}; defined? a[:b] returns "method", not nil.

Merge request reports