Sha256: 7d7493d16a754d54b91a469e0dc132ac00b2dabfc06ab81cf401d1c95433b285
Contents?: true
Size: 558 Bytes
Versions: 152
Compression:
Stored size: 558 Bytes
Contents
module ForestLiana module SchemaHelper def self.find_collection_from_model(active_record_class) collection_name = ForestLiana.name_for(active_record_class) ForestLiana.apimap.find { |collection| collection.name.to_s == collection_name } end def self.is_smart_field?(model, field_name) collection = self.find_collection_from_model(model) field_found = collection.fields.find { |collection_field| collection_field[:field].to_s == field_name } if collection field_found && field_found[:is_virtual] end end end
Version data entries
152 entries across 152 versions & 1 rubygems