class Circuit < ApplicationRecord
  belongs_to :admin

  
  acts_as_sorting :fields => {
    :id => {:name => "Id", :reorder => true},

    :name => {:name => "Nom", :reorder => true},
    :description => {:name => "Description", :reorder => true},
    :website => {:name => "Site Web", :reorder => true},
    
    :person_civilite => {:name => "Civilité", :reorder => true},
    :person_name => {:name => "Nom", :reorder => true},
    :person_firstname => {:name => "Prénom", :reorder => true},
    :person_fonction => {:name => "Fonction", :reorder => true},
    :email => {:name => "Email", :reorder => true},
    :email2 => {:name => "Email 2", :reorder => true},
    :tel => {:name => "Tel", :reorder => true},
    :portable => {:name => "Portable", :reorder => true},
    :address2 => {:name => "Adresse", :reorder => true},
    :address3 => {:name => "Adresse suite", :reorder => true},
    :cp => {:name => "CP", :reorder => true},
    :city => {:name => "Ville", :reorder => true},
    :country => {:name => "Pays", :reorder => true},
    :facebook => {:name => "Facebook", :reorder => true},
    
    
    :longueur => {:name => "Longueur", :reorder => true},
    :largeur => {:name => "Largeur", :reorder => true},
    :nbr_courbes => {:name => "Nbr. courbes", :reorder => true},
    :longueur_ligne => {:name => "Longueur ligne", :reorder => true},
    
    
    
    :actions => {:name => "Actions", :reorder => false}
  }

  def member_label
    "#{self.name}"
  end
  
end
