Sha256: 3d6a27ac962dd2fb60a2e0e9aa4fc28ba63c1196ed59cff31208683bb0054f71
Contents?: true
Size: 590 Bytes
Versions: 30
Compression:
Stored size: 590 Bytes
Contents
module Lolita module Configuration module Field class Enum < Lolita::Configuration::Field::Base def values value=nil, &block @values=value || block if value || block_given? @values end def view_values(view) record = view.send(:current_form).object if values.respond_to?(:call) values.call(view) else values || default_values end end private def default_values dbi_field.limit || [] rescue [] end end end end end
Version data entries
30 entries across 30 versions & 1 rubygems