Sha256: d327dc09bab3fdd016213f45d1097821eae3c54acc447f916ecdf4af2b395458
Contents?: true
Size: 755 Bytes
Versions: 9
Compression:
Stored size: 755 Bytes
Contents
module JeraPush::Admin::DevicesHelper def resource_extras(device) if JeraPush.resource_attributes && JeraPush.resource_attributes.any? return resource_attributes(JeraPush.resource_attributes, device.pushable) end return [device.pushable] end def resource_attributes(attributes, resource) if resource attrs = attributes.collect do |attribute| "#{attribute}: #{resource.send(attribute)}" end return attrs.delete_if { |v| v.nil?} end end def devices_fields_for_filter_select fields = [:token] if JeraPush.resource_attributes && JeraPush.resource_attributes.any? JeraPush.resource_attributes.each do |attribute| fields << attribute end end fields end end
Version data entries
9 entries across 9 versions & 1 rubygems