Sha256: 9a3fd4de9b1309d646b11d9179537302e9902b5a461624222edf5a8aac16c412
Contents?: true
Size: 577 Bytes
Versions: 11
Compression:
Stored size: 577 Bytes
Contents
module ActiveRecord module Enumerations module OptionsHelper def add_option config, option new_config = if config.first.is_a?(Array) [config[0], (config[1] || {}).merge(option)] else [(config[0] || {}).merge(option)] end config.replace new_config end alias_method :add_options, :add_option def extract_values_and_options config if config.first.is_a?(Array) [config[0], config[1] || {}] else [[], config[0] || {}] end end end end end
Version data entries
11 entries across 11 versions & 1 rubygems