Questions tagged [custom-routes]
198 questions
0
votes
2 answers
ruby on rails - routes error porting from 3.x to 4.x
i've started porting one of my apps from rails 3.x to rails 4.x....
when i start the app in development, i receive a route definition related error:
=> Booting WEBrick
=> Rails 4.2.5 application starting in development on http://localhost:3000
=>…

coppola_f
- 15
- 6
0
votes
1 answer
What is wrong with this MVC route?
I want to create a custom image URL handler, which can handle GET requests with the following URL pattern:
http://blah.com/images/image1.gif
To handle this I created the following route:
routes.MapRoute(
name: "appImages",
…

jujiro
- 190
- 1
- 1
- 11
0
votes
1 answer
Google Maps API and custom polyline route between Markers
I'd like to make a custom route for an android app, I'm not sure which API should I use and if it is compatible with Java.
As far as I know I need to use waypoints to make a route (I don't need to know the distance between the two points, just to…

Palomitasdearroz
- 13
- 2
- 2
0
votes
1 answer
Problem with custom routes
I'm using the following route
routes.MapRoute(
"PatientList",
"User/{SearchName}/{LocationID}/{Page}",
new { controller = "User", action = "Index", SearchName = "", LocationID = 0, Page = 1 }
);
It fails on the following URL: …

Jhorra
- 6,233
- 21
- 69
- 123
0
votes
2 answers
Providing more specificity to route resources
I have two lines in my routes.rb that look like this:
resources :locations
get '/locations/:session_series_token/new', to: 'locations#new', as: "new_location"
I want the create method in my LocationsController, and I also want a specific…

Allan
- 2,586
- 5
- 26
- 22
0
votes
2 answers
does url_for use to_param when building route
I'm having trouble getting url_for to render take to_param into account when choosing which route to use.
I have two sets of routes that use the same model (Foo). If Foo.is_special, the url should map to /special/:action. If it isn't, it should map…

phillee
- 2,227
- 2
- 19
- 28
0
votes
1 answer
minitest-rails : Test controller with full url
I want to test my controllers with minitest but :
- I use custom routing only
- I don't use named routes
I have some routes like this :
scope "administration" do
get '', to: 'administration#index'
get 'user/:id/update/', to:…

Zak
- 47
- 9
0
votes
1 answer
Routes only want a show on default despite explicit member statement
When I go to .. www.website.com/admin/organizations/org_deals , I get :
Missing template admin/organizations/show.erb in view path
My routes.rb :
map.namespace :admin do |admin|
admin.napespace :organizations do |organization|
…

Trip
- 26,756
- 46
- 158
- 277
0
votes
1 answer
Backbone app.navigate control changes to url
I have a backbone application residing at say, http://foo.com. My application behaves different for different region, so say if I navigated to http://foo.com/TX different set of information is loaded, while if I navigate to http://foo.com/OK another…

etrast81
- 280
- 1
- 4
- 16
0
votes
1 answer
Rails can't find my route but it exists!
Ok I have events that I want to publish/unpublish with an extra action (nonRESTful) I watched Ryan Bates' railscast on this: http://railscasts.com/episodes/35-custom-rest-actions and it got me most of the way. I think the problem is that my route is…

aarona
- 35,986
- 41
- 138
- 186
0
votes
1 answer
Rails Show data in another controller
I need to show data of other controller in my central controller
Central = patients_controller.rb
Other = weights_controller.rb
Controllers have relationship like this
MODELS:
patient.rb = has_many :weight
weight.rb = belongs_to :patient
I need…
user3856982
0
votes
1 answer
Kohana 3.3.2 Controller in subfolder
I'm starting with Kohana and i don't understand why i have this error ...
Kohana_HTTP_Exception [ 404 ]: The requested URL api/v1/welcome was not found on this server.
SYSPATH/classes/Kohana/Request/Client/Internal.php [ 89 ]
if ( !…

Eupho
- 58
- 5
0
votes
0 answers
Custom Route Not Working in mvc 4
I have created one custom route
routes.MapRoute("Exams",
"Exams/{id}/{name}",
new { controller = "Exam", action = "SingleExam", id = "", name = (string) null },
new[] { "MockTests.FrontEnd.Controllers" }
);
For this I…

vaibhav shah
- 4,939
- 19
- 58
- 96
0
votes
1 answer
How to get the variables in routing in zend framework 1.12
I am new to routing in zf. I don't understand some terms in route
$route = new Zend_Controller_Router_Route(
'author/:username',
array(
'controller' => 'profile',
'action' => 'userinfo'
)
…

user3702622
- 21
- 3
- 8
0
votes
2 answers
Rails route, show all elements on the same page
I need to show all my elements on the same page.
In routes:
namespace :nourishment do
resources :diets do
resources :nourishment_meals, :controller => 'meals'
get 'nourishment_meals/show_all_meals' => 'meals#show_all_meals', as:…