Sha256: 13d15cfa1ff163473c0655ee853f4d72386cd10da12ff4c97d3117ba0b2d7044
Contents?: true
Size: 370 Bytes
Versions: 8
Compression:
Stored size: 370 Bytes
Contents
require_relative "base" module Administrate module Field class BelongsTo < Field::Base def self.permitted_attribute(attr) :"#{attr}_id" end def permitted_attribute self.class.permitted_attribute(attribute) end def candidate_records Object.const_get(attribute.to_s.camelcase).all end end end end
Version data entries
8 entries across 8 versions & 1 rubygems