diff options
| author | Zog | 2018-03-05 15:19:30 +0100 | 
|---|---|---|
| committer | Zog | 2018-03-05 15:19:30 +0100 | 
| commit | 2b1a8cdc047cd80108ac4c5ef1fd2a64d77ab750 (patch) | |
| tree | a4c044bc9fc28e8afcd88741aad6da5b9ecb90d1 /app/models/simple_interface.rb | |
| parent | eb01c9180419f05ab0ad4a734c082cc889792e75 (diff) | |
| download | chouette-core-2b1a8cdc047cd80108ac4c5ef1fd2a64d77ab750.tar.bz2 | |
Refs #6068; Fully functional JSON exporter
Diffstat (limited to 'app/models/simple_interface.rb')
| -rw-r--r-- | app/models/simple_interface.rb | 6 | 
1 files changed, 5 insertions, 1 deletions
| diff --git a/app/models/simple_interface.rb b/app/models/simple_interface.rb index 07fabd832..5a1c3dca8 100644 --- a/app/models/simple_interface.rb +++ b/app/models/simple_interface.rb @@ -33,7 +33,7 @@ class SimpleInterface < ActiveRecord::Base      @errors = []      @messages = []      @padding = 1 -    @current_line = 0 +    @current_line = -1      @padding = [1, Math.log([@number_of_lines, 1].max, 10).ceil()].max    end @@ -280,6 +280,10 @@ class SimpleInterface < ActiveRecord::Base          !!@options[:required]        end +      def omit_nil? +        !!@options[:omit_nil] +      end +        def scope          @options[:scope] || []        end | 
