diff options
| author | cedricnjanga | 2018-01-30 23:26:45 -0800 |
|---|---|---|
| committer | cedricnjanga | 2018-02-06 11:04:59 -0800 |
| commit | c539b09d834476a36804072a92f8c2c373aa487b (patch) | |
| tree | 14d17afb43dc407eabe261e2f38216acf2475aa7 | |
| parent | f6a00ca090d5048772ad1869eb6d39068aba16f2 (diff) | |
| download | chouette-core-c539b09d834476a36804072a92f8c2c373aa487b.tar.bz2 | |
Refs ##5370 Set network action_link to disabled if line doesn't have one
| -rw-r--r-- | app/decorators/line_decorator.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/decorators/line_decorator.rb b/app/decorators/line_decorator.rb index 039ad90a3..0e7b6b9ae 100644 --- a/app/decorators/line_decorator.rb +++ b/app/decorators/line_decorator.rb @@ -20,6 +20,7 @@ class LineDecorator < AF83::Decorator instance_decorator.action_link secondary: :show do |l| l.content t('lines.actions.show_network') l.href { [scope, object.network] } + l.disabled { object.network.nil? } end instance_decorator.action_link secondary: :show do |l| |
