|
|
|
2 extend ActiveSupport::Concern
|
|
|
|
|
|
|
- DuplicateMethodCall - calls 'flash.now' 2 times » reek
- DuplicateMethodCall - calls 'translate_flash(value)' 2 times » reek
- TooManyStatements - has approx 7 statements » reek
- Complexity 6 » saikuro
|
6 def render(options = {}, locals = {}, &block)
|
|
7 flash_options = Hash === options ? options : locals
|
|
|
|
9 self.class._flash_types.each do |flash_type|
|
- Found = in conditional. It should probably be an == » roodi
|
10 if value = flash_options.delete(flash_type)
|
|
11 flash.now[flash_type] = translate_flash(value)
|
|
|
|
|
|
|
- Found = in conditional. It should probably be an == » roodi
|
15 if other_flashes = flash_options.delete(:flash)
|
|
16 other_flashes.each do |key, value|
|
|
17 flash.now[key] = translate_flash(value)
|
|
|
|
|
|
|
|
21 super(options, locals, &block)
|
|
|
|
|