Sha256: 2d6974850abb0c4d43ccfb4a62979768aa364bd28ae55af12fc2dd4d3bbc1235
Contents?: true
Size: 379 Bytes
Versions: 5
Compression:
Stored size: 379 Bytes
Contents
module Adminos::ArrayAttrs extend ActiveSupport::Concern module ClassMethods def array_attrs(*args) options = args.extract_options! args.each do |name| define_method :"#{name}_to_a" do value = send(name) split = value.split("\n") || [] values = split.map { |value| value.strip } end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems