Sha256: c8cb760c2afcc1e679bf82570bf2ce779671a4429bbefc1efc92777b882526c2
Contents?: true
Size: 680 Bytes
Versions: 15
Compression:
Stored size: 680 Bytes
Contents
module VisualConditionBuilder module Helper def dictionary_values(id_field, label_field) self.map {|r| {id: r[id_field], label: r[label_field]}} end end end #INJETANDO METODO para_* em um conjunto de array class Array include VisualConditionBuilder::Helper end #INJETANDO METODO para_* em um conjunto de registros ActiveRecord::Relation if defined?(ActiveRecord) module ActiveRecord class Relation include VisualConditionBuilder::Helper end end end #INJETANDO METODO para_* em um conjunto de registros Mongoid::Criteria if defined?(Mongoid) module Mongoid class Criteria include VisualConditionBuilder::Helper end end end
Version data entries
15 entries across 15 versions & 1 rubygems