Skip to content

Instantly share code, notes, and snippets.

@luckyruby
Created April 18, 2012 21:38
Show Gist options
  • Save luckyruby/2416769 to your computer and use it in GitHub Desktop.
Save luckyruby/2416769 to your computer and use it in GitHub Desktop.
- if @location.car_types.present?
%table.pretty
%tr
%th Name
%th Description
%th  
- for car_type in @location.supported_car_types
%tr{:class => cycle('even','odd', :name => 'colors')}
%td= car_type.name
%td
- if car_type.description.present?
= link_to car_type.description, edit_car_type_description_location_path(:location_car_type_id => car_type.id), :remote => true, :method => :get
- else
= link_to 'Add Description', edit_car_type_description_location_path(:location_car_type_id => car_type.id), :remote => true, :method => :get
%td= link_to image_tag('delete.png'), remove_car_type_location_path(:location_car_type_id => car_type.id), :method => :delete, :remote => true, :confirm => 'Are you sure?'
- reset_cycle('colors')
#car_type_description_form
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment