routes

How do I strip unnecessary information from a user friendly url before it gets to a controller action

We are trying to use custom routes in an ASP.NET MVC application to generate this url: 'http://example.com/Person/unnecessaryinfo-42'. The "unnecessaryinfo" is the name of the id which will make the URL hackable for the user. Below is the code for our route map. This works but my controller action ends up with "unnecesaryinfo-42" in the ...

List of Controller Routes in Rails 3?

Hey everybody! What I'm trying to do: I create some controllers, for example: Home About Gallery Contact Now I want to create a navigation automatically. So is there a way to programmatically fetch the list of controllers/actions to build this navigation? I don't want to fix the navigation everytime I add a controller. ...

Using a Nested-Model form as a Partial on a different models's page

Hello, I have a nested model form for PhotoAlbums. The form works fine via the standard html. But what I need to do is render it as a partial in another page it's erroring: "No route matches {:action=>"create", :controller=>"photo_albums"}" The models: Projects has_many :photo_albums PhotoAlbums belongs_to :project has_m...

I want the following urls pattern, please help I'm using rails 3

I want the following urls for my UserController: localhost/user/join localhost/user/login localhost/user/user_name (this can be any name in here, it should fire the 'profile' action) Then within the /user/user_name_here/ folder I want: /user/user_name/blah1/ /user/user_name/blah2/ /user/user_name/blah3/ It seems doing resources :us...

Rails: routing update error

I am getting a routing error: No route matches "/deccom_tasks/update/1" with {:method=>:put} I'm not sure why I am getting a routing error for a route that usually works. Route: map.resources :decom_tasks, :collection => {:sort => :post, :deactivate_task => :get, :reactivate_task => :get} Controller: def update @task = Task....

Zend framework route chaining in ini file

I've got my routes configured as below: routes.rooms.type = "Zend_Controller_Router_Route_Static" routes.rooms.route = "/rooms" routes.rooms.defaults.module = "rooms" routes.rooms.defaults.controller = "index" routes.rooms.defaults.action = "index" routes.rooms.chains.room.type = "Zend_Controller_Router_Route_Regex" routes.rooms.chains...

Cartography and road maps in java

Hi all i'm developing an application must show a list of customers, resellers and other types of data an ao geographic map (from satellites) or on a road map for an university's exam. With this application i've to calulate the isodromi distance and the street route, where possible, from a source and a destination. I looked at Google Map...

Rails: Override RESTful paths?

Is it possible to override a RESTful path? For instance, I have photo_path(photo) which would generate /photos/12345 But I'd like for all uses of photo_path to actually generate URL's like /photos/joeschmoe/12345 (which is the photo's user and the photo id). Obviously I could just create a new route, but wanted to make sure there wasn...

Create short permalinks similar to Stack Overflow's "short permalink to this question"

I think I might already understand how this works, but wanted to be sure. I am in the process of defining the routes for a new ASP.NET MVC application. I'd like to create short permalinks similar to Stack Overflow's short permalink to this question: http://stackoverflow.com/q/4047890/61654 What route and controller mechanism is S...