Skip to content
Snippets Groups Projects

Replace defined? in views with local_assigns

Closed Ramya Authappan 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

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading