class Array

Public Instance Methods

fetch_all_objects_from_klasses() click to toggle source
# File lib/generators/active_admin_simple_life/templates/array.rb, line 3
def fetch_all_objects_from_klasses
  inject([]) do |a, klass|
    a << klass.all.map do |object|
      [I18n.t("activerecord.singular_models.#{klass.to_s.underscore}") + " - #{object}",
       "#{object.class}##{object.id}"]
    end
  end.flatten(1)
end