diff options
| author | Zog | 2018-03-16 14:36:47 +0100 |
|---|---|---|
| committer | Johan Van Ryseghem | 2018-04-04 11:10:39 +0200 |
| commit | 6f8bba2239c1717b3224e836eea0f9392fbb5c97 (patch) | |
| tree | ead29b582d7c960136c320f0dddc56ec64fd47f9 /app/models/custom_field.rb | |
| parent | d034376737c27e48a7a3413b82461a65999ee105 (diff) | |
| download | chouette-core-6f8bba2239c1717b3224e836eea0f9392fbb5c97.tar.bz2 | |
Refs #6184; Add default values to custom_fields
Diffstat (limited to 'app/models/custom_field.rb')
| -rw-r--r-- | app/models/custom_field.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/custom_field.rb b/app/models/custom_field.rb index a42f1651d..6236f482e 100644 --- a/app/models/custom_field.rb +++ b/app/models/custom_field.rb @@ -44,6 +44,10 @@ class CustomField < ActiveRecord::Base delegate :code, :name, :field_type, to: :@custom_field + def default_value + options["default"] + end + def options @custom_field.options || {} end |
