aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorGuillaume2017-11-28 15:44:16 +0100
committerGuillaume2017-11-28 15:44:16 +0100
commit9a8ddef8dbfec3ac656b0980a1614b8720e6a950 (patch)
treecfec65c71ae71e12ee25c6bf4d6fcb6eccdd8840 /app
parent2b11404b58dad37cc9e5dae3e24bcf7b466f5c32 (diff)
downloadchouette-core-9a8ddef8dbfec3ac656b0980a1614b8720e6a950.tar.bz2
Refs #4824, #4825 fix error line_decorator
Diffstat (limited to 'app')
-rw-r--r--app/decorators/line_decorator.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/decorators/line_decorator.rb b/app/decorators/line_decorator.rb
index ee35cd85e..ede670cbd 100644
--- a/app/decorators/line_decorator.rb
+++ b/app/decorators/line_decorator.rb
@@ -21,7 +21,7 @@ class LineDecorator < Draper::Decorator
href: [context[:line_referential], object.company]
)
- if h.policy(Chouette::Line).update? &&
+ if h.policy(Chouette::Line).create? &&
context[:line_referential].organisations.include?(
context[:current_organisation]
)
@@ -48,6 +48,8 @@ class LineDecorator < Draper::Decorator
method: :delete,
data: {confirm: h.t('lines.actions.destroy_confirm')}
)
+ end
+
links
end
end