Velocipede's User, Sales, and Bike Inventory Web App
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
548 B

class Transactions < Netzke::Basepack::Grid
def configure(c)
super
c.model = "Transaction"
c.strong_default_attrs = { :vendor_id => controller.current_user.id }
c.columns = [
:amount,
:item,
{ :name => :bike__serial_number},
{ :name => :vendor, :getter => lambda { |rec|
user = rec.vendor
user.nil? ? "" : "#{user.first_name} #{user.last_name}"
}
}
]
end
end