module ArrayExtender
Extender to add functionality to Array
class to make optars
method available for an array of ActiveRecord objects, returning array of `OAR`s which we generate
Public Instance Methods
optars(options = {})
click to toggle source
# File lib/opt_ar/core_ext/array.rb, line 5 def optars(options = {}) map do |obj| unless obj.is_a? ActiveRecord::Base raise OptAR::Errors::NonActiveRecordError end obj.optar(options) end end
Also aliased as: opt_ar_objects