Questions tagged [custom-routes]

198 questions
1
vote
1 answer

Routing Error - Custom Contoller Method (Adding Custom routes in resource routes)

I want to add link to friends list but i get routing error No route matches {:action=>"friend_list", :controller=>"users_controller"} users_controller def friend_list @frnds = User.find_friends(current_user) end routes devise_for…
Alaa Othman
  • 1,109
  • 12
  • 16
1
vote
1 answer

umbraco MVC custom routes using a dot in url

I have a problem with using a dot in url umbraco MVC custom routes. /logo/images/image.jpg?width=100 gives following errors: [NullReferenceException: Object reference not set to an instance of an object.] …
1
vote
1 answer

Route old ids to new routes with the same controller name and using friendly id

I have a rails app but I need to route old routes from a php app to my new rails routes (because of old google ads tied to them). I have looked far and wide and I can't figure out how to solve my problem. I have a videos controller where my new…
AGirlThatCodes
  • 575
  • 7
  • 21
1
vote
1 answer

Rewrite URL for menu item CodeIgniter

First of all - I read over 40 posts on StackOverflow and I don't find solutions to my problem... I have an application written in CodeIgniter. I want to rewrite URL: http://example.com/codeigniter/en/176/terms_and_rules On this…
1
vote
2 answers

How do I write a route that is SEO friendly in rails?

I am changing my site over from Google App Engine to rails and I would like to keep my place in google search. Currently my site uses a URL /page?pid=microsoft-interview-questions to access the Microsoft subsection of interview questions. How would…
Teddy
  • 579
  • 1
  • 4
  • 17
1
vote
1 answer

Django REST Framework show multiple forms on HTML view

I have a ViewSet using Django REST Framework that has both standard and custom routes. The serializer for each route is different. Example: class UserViewSet(ViewSet): model = User serializer_class = UserSerializer …
seawolf
  • 2,147
  • 3
  • 20
  • 37
1
vote
1 answer

Protecting images in ASP.NET MVC (w/ custom RouteHandler)

I created a custom RouteHandler for images that I want protected. My RouteHandler simply takes a new route (graphics/{filename}) and does a lookup for the true file path, sets the mime type, and serves it up. That works fine.…
Brian David Berman
  • 7,514
  • 26
  • 77
  • 144
1
vote
1 answer

custom routes not work when defined as "member" in rails 3.2 resources

We need to define 4 custom actions in rails 3.2 app. Those 4 actions take care of creating and edit customer login. In routes.rb, here was addition to routes.rb: member do get :new_customer_login put :create_customer_login get…
user938363
  • 9,990
  • 38
  • 137
  • 303
1
vote
1 answer

Scala-Akka: Log all messages passing by a router

I have a Group actor with a custom routing logic implemented. I want to set up the logging so that I know exactly what messages transit through the router (and, possibly, to check where they are sent, but this would be a plus). I know how to…
Diego Martinoia
  • 4,592
  • 1
  • 17
  • 36
1
vote
1 answer

rails 4 child action fails while called from parent view

Error: "Param is missing or the value is empty :child" I've nested objects (child controler & viewers are in Parent folder). On parent detail page I list all children in a table. Other methods like edit, update, new work. But I want to have a link…
Katarzyna
  • 1,712
  • 2
  • 11
  • 14
1
vote
3 answers

Custom route yields dot instead of '?id='

I am adding a custon new action for my rails app by adding the following to my routes.rb: resources :adventures do member do match :upvote, via: [:post, :delete] match :downvote, via: [:post, :delete] end get 'seed', on: :new end (you…
hodale
  • 717
  • 1
  • 6
  • 13
1
vote
0 answers

kohana dynamic uri routing to redirect to a controller function

I have to write a route in kohana for the following $this->request->redirect("/" . input::post('custom_url')); example if the custom_url = testpage then it should be 'abc.com/testpage' and it should be redirected to a controller function example…
1
vote
2 answers

Editing parameters from lowercase to uppercase in routes.rb?

I'm working on a Ruby on Rails app where my routes can properly handle something like http://localhost:3000/CA to go to some page about California. It handles lower case "ca" but is there a way such that if my user manually types in lower case "ca",…
Matthew
  • 2,035
  • 4
  • 25
  • 48
1
vote
1 answer

Ruby on Rails - Creating a route for a custom view

I feel like I'm really close so I'll get to the point. I've created a new view file (app/views/subjects/screening.html.erb). That would place the new file next to the edit.html.erb, which I used as my template. My edit.html.erb file works as…
Ian Ellis
  • 541
  • 6
  • 19
1
vote
0 answers

How to use TestUnit with custom Devise mappings with Rails

I am trying to enable functional testing for custom Devise routes, but I keep hitting roadblocks that I am not sure how to solve. The routes I am trying to test are in the devise_scope :user block of my routes file (see below) devise_for :users,…