Tag: routes
-
Dynamic Robots.txt with Web Api 2
Hi everyone, For a project I’m currently working on I needed a dynamic robots.txt. Because our test environment is public facing we want to keep it from being indexed by Google etc. It took a bit of Googling to find a solution that worked, but in the end it was actually pretty simple. Here’s the…
-
Route Parameters – AngularJS
Hey everyone, This is just a quick post on what I did to get my routes working properly with AngularJS. My routes looked like this: //Configure routes app.config(function ($routeProvider) { $routeProvider //… .when(‘/Businesses/Details/:id’, { templateUrl: ‘/Businesses/Details’ }) //… .otherwise({ redirectTo: ‘/’ }); }); And then to access the ID parameter I used $routeParams: /* Used…
-
Devise Overriding Controller Route – Ruby on Rails
I ran into a bit of a problem today after implementing a search form that appeared on every page. When the login page was loaded I received the following error: No route matches {:controller=>”devise/products”, :method=>:get, :action=>”search”} The weird thing about this is that the route my search form uses does not mention devise in any…
-
Error 324 (net::ERR_EMPTY_RESPONSE) – Ruby on Rails
I managed to break my app again while playing around with the routes and a few redirects: No data received Unable to load the webpage because the server sent no data. Here are some suggestions: Reload this webpage later. Error 324 (net::ERR_EMPTY_RESPONSE): The server closed the connection without sending any data. This wasn’t one…
-
Routing Error – No Route Matches [Post] “orders/new”
I ran into a fairly common routing error this morning, thankfully these are fairly easy to fix – usually! Routing Error No route matches [POST] “/orders/new” Simply add the following the route to your routes.rb file: siteconfigroutes.rb #Orders controller :orders do post ‘orders/new’ => ‘orders#new’ end You may also have to restart WEBrick for this…