Revu de code de la partie "/dossiers/dossier_id:/carte" :
/app/controllers/carte_controller.rb - l10/11 @dossier.update_attributes() - l27 : le @dossier ne semble pas necessaire - l32 : update attributes Ajouter : def dossier_id params[:dossier_id] end /spec/controllers/carte_controller_spec.rb - l 11/16 : utiliser nouvelle syntaxe pour les hashs : get :show, dossier_id: dossier_id - l32 bancal : Commentaire.last.id, en theorie tu n'as jamais besoin d'écrire de requête sql dans tes tests l36 subject { Commentaire.last } - l64, le cas ou c'est en erreur n'est pas testé (le géocodeur renvoie nil)
This commit is contained in:
parent
6e2c0f733c
commit
cfee2a6ddf
4 changed files with 59 additions and 24 deletions
|
@ -47,10 +47,17 @@
|
|||
});
|
||||
|
||||
position = get_position();
|
||||
position_zoom = 13;
|
||||
|
||||
if (position.lat == '0' && position.lon == '0'){
|
||||
position.lon = '2.428462';
|
||||
position.lat = '46.538192';
|
||||
position_zoom = 6;
|
||||
}
|
||||
|
||||
map = L.map(mapId, {
|
||||
center: new L.LatLng(position.lat, position.lon),
|
||||
zoom: 13,
|
||||
zoom: position_zoom,
|
||||
layers: [OSM],
|
||||
photonControl: true,
|
||||
photonControlOptions: photonControlOptions,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue