1
0
mirror of https://github.com/fspc/BikeShed-1.git synced 2025-02-28 16:53:23 -05:00

Fixing logs add_in_form and search

This commit is contained in:
Jason Denney 2013-06-01 14:47:20 -04:00
parent edff478204
commit 88d3160e29

View File

@ -22,4 +22,25 @@ class Logs < Netzke::Basepack::Grid
{ :name => :hours, :getter => lambda { |rec| (rec.end_date - rec.start_date)/3600 }, :sorting_scope => :sort_by_duration}
]
end
def default_fields_for_forms
[
:loggable_id,
:loggable_type,
:logger_id,
:logger_type,
:context,
:start_date,
:end_date,
:description,
:log_action_id,
:log_action_type,
:created_at,
:updated_at
].map{ |x| { :name => x, :field_label => x.to_s.humanize} }
end
def default_bbar
[ :apply, :add_in_form, :search ]
end
end