1
0
mirror of https://github.com/fspc/BikeShed-1.git synced 2025-04-04 05:33:22 -04:00
BikeShed-1/app/components/bike_brands.rb
2013-04-11 21:14:27 -04:00

20 lines
520 B
Ruby

class BikeBrands < Netzke::Basepack::Grid
def configure(c)
super
c.model = "BikeBrand"
c.title = "Brands"
c.prohibit_update = true if cannot? :update, BikeBrand
c.prohibit_create = true if cannot? :create, BikeBrand
c.prohibit_delete = true if cannot? :delete, BikeBrand
end
#override with nil to remove actions
def default_bbar
bbar = [ :search ]
bbar.concat [ :apply ] if can? :update, BikeBrand
bbar.concat [ :add_in_form ] if can? :create, BikeBrand
bbar
end
end