Questions tagged [custom-routes]
198 questions
0
votes
1 answer
app/web.1: ActionController::RoutingError (No route matches [GET] "/"):
I've been struggling with this for a while. All links work correctly on my localhost, however, when I attempt to push it to Heroku, my browser returns "The page you were looking for doesn't exist."
My Paper Trail add-on shows this…

user3583281
- 3
- 1
0
votes
0 answers
Laravel 4, I defined a route but error message still says [route] not defined
I defined a route in Laravel as:
/*Create Commission (POST)*/
Route::post('/commissions/create', array(
'as' => 'commission-create-post',
'uses' => 'CommissionController@postCreate',
));
But am getting error message: Route…

mario
- 1,503
- 4
- 22
- 42
0
votes
1 answer
What is best method to adding a custom route to a shallow nested resource
I am using the act_as_votable gem to be able to like objects from two different models.
Everything works as expected in the Rails Console.
I am having trouble being able to create the route that I need in controller whose resources are being…

user2275037
- 3
- 2
0
votes
1 answer
Actionlinks breaks when MapPageRoute added
We need to add a .html file which should be part of the root directory of our mvc app so i added the following
Route AnnouncementRoute = routes.MapPageRoute
("Announcement", "Announcement",…

Marcer
- 839
- 1
- 12
- 25
0
votes
2 answers
Customizing resource routes for every action
I have a resources :posts. How can I customize it's paths to the following and also ability to call it with the normal resource path names:
URL Controller action Helper function
'q' 'posts#index' posts_path
'q/(:id)' …

Hopstream
- 6,391
- 11
- 50
- 81
0
votes
2 answers
Rails Routes get :this[:id]
I'm having problems with getting the correct route set up in my routes file.
I have a controller for Events.
Within the Events Controller I have an action called "people" which looks a little like this:
def people
@people =…

Drew Harris
- 486
- 1
- 5
- 13
0
votes
1 answer
No route matches {:action=>"show", :controller=>"controller_name"}
I'm always getting this error and I don't understand where I am wrong. I think I have everything I need action in controller, resources in route file and view for controller action. I put the route current_events/new in the browser when I get this…

Naomi K
- 1,437
- 4
- 13
- 20
0
votes
5 answers
How do I add different types of GET routes that require parameters in Ruby on Rails
I have a list of users being displayed, you can click on "Show user" or "PDF" to see details of that user in HTML or as a PDF document. The show was automatically created with scaffolding, now I'm trying to add the option to view it as a PDF. The…

Aydin
- 311
- 4
- 15
0
votes
1 answer
Url Routing for unknown number of params
I have seen this post: MVC Handler for an unknown number of optional parameters but it's for MVC and doesn't seem to work for me as I get an error:
A path segment that contains more than one section, such as a literal section or a parameter, cannot…

webnoob
- 15,747
- 13
- 83
- 165
0
votes
1 answer
MVC.NET Custom Root Handler Wrong action in Html:BeginForm
I used custom mvc route handler. But When I use Html.BeginForm or Ajax.BeginForm in the view, Action parameters change unexpectedly. My codes are above
My Register Route method is :
public static void RegisterRoutes(RouteCollection routes)
{
…

Serkan
- 27
- 7
0
votes
1 answer
Cannot figure out which route between two same method, one without parameter and one with
In my controller, I have two method like that :
public ActionResult NouvelleDemande()
{
int NumDossier = StructureData.DonneNumDossier((string)Session["Utilisateur"], (string)Session["MotDePasse"]);
List ListeContacts…

Hubert Solecki
- 2,611
- 5
- 31
- 63
0
votes
1 answer
Changing route from GET to Delete in RoR
logout GET /logout(.:format) devise/sessions#destroy
This is the route I am interested in.
However, when I go to /logout, I get this error:
No route matches [DELETE] "/logout", how do I change this route from get to delete?
This is how my route is…

Albzi
- 15,431
- 6
- 46
- 63
0
votes
2 answers
Rails: Shallow route name with custom behaviour
Let's say I have two models (Model1 and Model2) that share the same controller, both have many instances of Model3.
How can I achieve to nest Model 3 within both models and have the route: model_3_path(@model) instead of model_1_model_3_path(@model)…

Danyel
- 2,180
- 18
- 32
0
votes
2 answers
Codeigniter Dynamic Routing to single controller
I know this question has been asked in a similar fashion several times. However, I'm struggling to find any answers that would work in my situation. I primarily work on Microsoft projects and stepped in on this project to help during crunch.
Here's…

Zach Johnson
- 123
- 9
0
votes
1 answer
Upgrade classic ASP to MVC 4.0
I'm in the process of upgrading from classic ASP to MVC 4.0. MVC projects have a unique folder structure with modules, views, and controllers. Our classic ASP website is very well indexed in search engines, and uses all friendly URLs (some mapped…

devnuts
- 137
- 2
- 14