Je viens de commencer à apprendre RoR. Ceci est mon fichier /app/trip_controller.rbErreur de routage Aucun chemin correspond
class TripController < ApplicationController
layout 'main'
def index
end
def map
session[:location] = Location.new(params[:location])
@map = GMap.new("map_div")
@map.control_init(:large_map => true, :map_type => true)
@map.icon_global_init(GIcon.new(:image => "http://www.google.com/
mapfiles/ms/icons/blue-pushpin.png",
:shadow => "http://www.google.com/mapfiles/shadow50.png",
:icon_size => GSize.new(32,32),
:shadow_size => GSize.new(37,32),
:icon_anchor => GPoint.new(9,32),
:info_window_anchor => GPoint.new(9,2),
:info_shadow_anchor => GPoint.new(18,25)),
"icon_source")
icon_source = Variable.new("icon_source")
source = GMarker.new([session[:location].lat,
session[:location].long],
:title => 'Source',
:info_window => "Start here!",
:icon => icon_source)
@map.overlay_init(source)
@map.center_zoom_init([session[:location].lat,
session[:location].long], 12)
@location = session[:location].location
end
fin
Et voici mon fichier routes.rb
Project::Application.routes.draw do
end
Mon dossier/app/vues a les fichiers suivants
Lorsque je démarre le serveur et que je me rends à localhost: 3000/trip sur mon navigateur, j'obtiens l'erreurNo route matches [GET] "/trip"
Dois-je configurer quelque chose dans le fichier routes.rb?