dont decorate nil
arnaud sellenet
committed Jun 17, 2014
commit c1a0be2053b49e64e147f44d89e5513743c995d7
Showing 1
changed file with
4 additions
and 1 deletions
locomotive/steam/middlewares/page.rb b/lib/locomotive/steam/middlewares/page.rb
+4
-1
| @@ | @@ -38,7 +38,10 @@ module Locomotive::Steam |
| def decorated(locale) | |
| entity = yield | |
| - | Locomotive::Decorators::I18nDecorator.new(entity, locale) unless entity.nil? |
| + | unless entity.nil? |
| + | Locomotive::Steam::Decorators::PageDecorator.new( |
| + | Locomotive::Decorators::I18nDecorator.new(entity, locale)) |
| + | end |
| end | |
| def path_combinations(path) | |