diff options
| author | Luc Donnet | 2018-05-04 09:55:12 +0200 | 
|---|---|---|
| committer | GitHub | 2018-05-04 09:55:12 +0200 | 
| commit | 4438611e99c12faefdc73ff6cbd966951bc6dd1b (patch) | |
| tree | aaa19e2a194063c222c0e26c7a16877dcbecdf7c /app | |
| parent | fc71f67eb75f956aa2c3e1aae85e99b5b82bc0a3 (diff) | |
| parent | fc427e5807f62416fdc93a8c6dda006137f06537 (diff) | |
| download | chouette-core-4438611e99c12faefdc73ff6cbd966951bc6dd1b.tar.bz2 | |
Merge pull request #549 from af83/6920-activate-newly-created-referentials
6920 activate newly created referentials
Diffstat (limited to 'app')
| -rw-r--r-- | app/decorators/referential_decorator.rb | 2 | ||||
| -rw-r--r-- | app/models/referential.rb | 1 | 
2 files changed, 2 insertions, 1 deletions
| diff --git a/app/decorators/referential_decorator.rb b/app/decorators/referential_decorator.rb index e01987e59..db6261120 100644 --- a/app/decorators/referential_decorator.rb +++ b/app/decorators/referential_decorator.rb @@ -36,7 +36,7 @@ class ReferentialDecorator < AF83::Decorator        l.method :put      end -    instance_decorator.action_link policy: :unarchive, secondary: :show, on: :show do |l| +    instance_decorator.action_link policy: :unarchive, secondary: :show do |l|        l.content t('actions.unarchive')        l.href { h.unarchive_referential_path(object.id) }        l.method :put diff --git a/app/models/referential.rb b/app/models/referential.rb index b4f64fad1..792353a73 100644 --- a/app/models/referential.rb +++ b/app/models/referential.rb @@ -322,6 +322,7 @@ class Referential < ApplicationModel    before_create :create_schema    after_create :clone_schema, if: :created_from +  after_create :active!, unless: :created_from    before_destroy :destroy_schema    before_destroy :destroy_jobs | 
