Class: Array
- Inherits:
-
Object
- Object
- Array
- Defined in:
- lib/generators/active_admin_simple_life/templates/array.rb
Instance Method Summary collapse
Instance Method Details
#fetch_all_objects_from_klasses ⇒ Object
3 4 5 6 7 8 9 10 |
# 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 |