Questions tagged [custom-routes]
198 questions
0
votes
3 answers
Confusing routing issue
I'm working on a project management web app and I have to pages for viewing projects. One is for viewing all the projects, and the other one is for management of of the project the user owns (i.e is administrator).
As it is now one can reach the…

dracula
- 191
- 1
- 3
- 11
0
votes
2 answers
Should Redirect to a common display/page on Custom Route/Page Not Found error in Rails
I am working on a Rails app. In my app, if I enter a custom route manually in the address bar/ as URL which is not present in config/routes.rb, it will show up the below given error message.
Routing Error
No route matches…

Rajesh Omanakuttan
- 6,788
- 7
- 47
- 85
0
votes
2 answers
Rails 3.2 Custom Route Error
In Rails 3.2.8 site, I get the following error:
Routing Error
No route matches {:controller=>"tasks", :action=>"complete", :list_id=>1, :id=>nil}
In my routes file I have the following:
resources :lists do
resources :tasks
end
match…

Dobabeswe
- 83
- 1
- 7
0
votes
1 answer
How to change where the default Ruby on Rails "redirect_to @user" path goes?
Currently I have a rails app where user profiles are viewed at "/users/:id", but I want to change that to "/:username". I've fixed the rails routes so that I have "match '/:username', :to => 'users#show', but I want to make it so I can easily use…

Jonathan Sutherland
- 825
- 1
- 8
- 16
0
votes
1 answer
route works one place, not others
This is kind of difficult to communicate but I'll try without pasting all my code. I have Members who have one Mailbox which has many Receipts. In the header layout I have a nav that calls
<%= link_to "Message Center",…

HappaGirl
- 117
- 1
- 10
0
votes
2 answers
Custom Admin Routing - View/Admin/MyModel/index.ctp instead of View/MyModel/admin_index.ctp
In CakePHP, is there a way to set admin routing on an URL like this:
...com/admin/articles/
to go to:
View/Admin/Articles/index.ctp
instead of:
View/Articles/admin_index.ctp
My thought is, it would be nice to keep my admin files more separate…

Dave
- 28,833
- 23
- 113
- 183
0
votes
1 answer
rails 3 route redirect error :id => "routename"
So I'm trying to have a link look up a method in my controller then redirect to a custom page with the path /trials/my_plays
I'm getting the error:
"Couldn't find Trail with id=my_plays" in the "app/controllers/trails_controller.rb:48:in…

HappaGirl
- 117
- 1
- 10
0
votes
2 answers
Create a simple route
I am having problems create the right route. I want to pass in the id of the element that i am working on but it does not look right.
my route looks like
resources :accounts
match 'account-audit' => 'accounts#audited',:as => :accountaudit
and…

MZaragoza
- 10,108
- 9
- 71
- 116
0
votes
1 answer
Why is this Rails Custom Route for this method not working
Im trying to see why this custom route for this method throws an exception:
tasks_controller.rb
def run
@task = Task.find(params[:id])
@task.run_task
flash[:notice] = "Running Task #{@task.task_name}in the background,…

banditKing
- 9,405
- 28
- 100
- 157
0
votes
1 answer
How can I route a nested resource to an alias?
I know it's not advised to go more then 1 level deep in nested routes but here's what I have:
resources :partners do
resources :recommend_partners do
resources :rec_partner_comments
end
end
Is there a way that I can call an alias…

Breno
- 5,952
- 1
- 20
- 25
0
votes
1 answer
Rails 3 Named Routes - Calling different actions in the controller dynamically as a parameter with the same named route
Say i have a controller with index and doesn't have any other RESTful actions. I want to call different actions as a parametr from the same controller which has a named route as follows.
Example,
I have TargetsController and i should be able to call…

Baaju
- 1,992
- 2
- 18
- 22
0
votes
1 answer
ASP.NET MVC3 dynamic routing
I'm having trouble finding the answer to this question anywhere.
I am in need of creating a form where the user can create a post and change the url to the post.
For example, if the default route is…

hjavaher
- 2,589
- 3
- 30
- 52
-1
votes
1 answer
How to create custom endpoints for custom post types with ACF?
I've created a custom post type with custom fields (using Advanced Custom Fields plugin).
I need to create different routes for each single post, using a code expressed during the creation of the post.
In particular: I have a field called…

Federico
- 415
- 1
- 3
- 15
-1
votes
1 answer
custom action submitting multiple forms in Rails
So I have this structure of application: a Game model which has many Allies and many Enemies.
I want to create a custom action for Game dedicated to create and submit enemies and allies.
So in the view I will have 2 fields_for that you can submit at…

Manspider
- 353
- 3
- 17
-1
votes
1 answer
what is difference between resourceful and non resourceful routes
Difference between resourceful and non resourceful routes?
Actually I know one difference that we can create our custom paths in non resourceful routes.
But this routes can also be possible by member and collection in resourceful routes.
So what…

Nimish
- 1,053
- 13
- 29