lib/critic/callbacks.rb in critic-0.2.0 vs lib/critic/callbacks.rb in critic-0.2.1

- old
+ new

@@ -56,13 +56,13 @@ _normalize_callback_option(options, :except, :unless) end def _normalize_callback_option(options, from, to) # :nodoc: from = options[from] - if from - from = Array(from).map { |o| "authorization.action.to_s == '#{o}'" } - options[to] = Array(options[to]).unshift(from).join(' || ') - end + return unless from + + from = Array(from).map { |o| "authorization.action.to_s == '#{o}'" } + options[to] = Array(options[to]).unshift(from).join(' || ') end # Skip before, after, and around action callbacks matching any of the names. # # ==== Parameters