Sha256: 9d6ea06442a4c4d3923e393ca0648d2a0e128ad07099875daea16db816d19286
Contents?: true
Size: 777 Bytes
Versions: 8
Compression:
Stored size: 777 Bytes
Contents
require 'rails_admin' module RailsAdmin module Config module Fields class Group register_instance_option :weight do name.to_sym == :default ? -1_000_000 : 0 end def visible_fields section.with(bindings).visible_fields.select { |f| f.group == self }.sort do |a, b| a.weight <=> b.weight end end end end end end module RailsAdmin module Config module HasGroups def visible_groups parent.groups.collect { |f| f.section = self f.with(bindings) }.select { |g| g.visible? and g.visible_fields.present? }.sort do |a, b| a.weight <=> b.weight end end end end end
Version data entries
8 entries across 8 versions & 1 rubygems