Sha256: b2ec6847cff7105681c55cf758deaef7313f6ab46e35b1b13c05b875e7e8125f
Contents?: true
Size: 668 Bytes
Versions: 20
Compression:
Stored size: 668 Bytes
Contents
class ApplicationDictionary < ::ApplicationController include VisualConditionBuilder::ApplicationHelper def initialize(request) self.request = request end def dictionary(dictionar_klass_name, context) @klass = Object.const_get "#{dictionar_klass_name}".classify dictionary = @klass.dictionary(context) dictionary.each do |field| if field[:values].present? && field[:values].is_a?(Proc) field[:values] = self.instance_exec(&field[:values]) end if field[:operators].present? && field[:operators].is_a?(Proc) field[:operators] = self.instance_exec(&field[:operators]) end end dictionary end end
Version data entries
20 entries across 20 versions & 1 rubygems