diff options
| author | Zog | 2018-03-27 15:05:37 +0200 |
|---|---|---|
| committer | Johan Van Ryseghem | 2018-03-27 15:06:12 +0200 |
| commit | d3ab2606ffd3dcb94a27d7b4e7c899f1238d3a53 (patch) | |
| tree | 3307534b0ddb31dac3ece549e8769d56ad784e29 | |
| parent | 6e3d0d2544f385fc8ab623bcd8d0e283e803aa7f (diff) | |
| download | chouette-core-d3ab2606ffd3dcb94a27d7b4e7c899f1238d3a53.tar.bz2 | |
Fix CustomFields with nil options
| -rw-r--r-- | app/models/custom_field.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/models/custom_field.rb b/app/models/custom_field.rb index 4a840744e..402df7fa9 100644 --- a/app/models/custom_field.rb +++ b/app/models/custom_field.rb @@ -38,7 +38,11 @@ class CustomField < ActiveRecord::Base @valid = false end - delegate :code, :name, :field_type, :options, to: :@custom_field + delegate :code, :name, :field_type, to: :@custom_field + + def options + @custom_field.options || {} + end def validate @valid = true |
