app/helpers/para/admin/components_helper.rb in para-0.4.0 vs app/helpers/para/admin/components_helper.rb in para-0.5.0
- old
+ new
@@ -1,4 +1,11 @@
module Para
module Admin::ComponentsHelper
+ def ordered_components
+ @component_sections.each_with_object([]) do |section, components|
+ section.components.each do |component|
+ components << component
+ end
+ end.sort_by(&:updated_at)
+ end
end
end