Hello,
We have a classic VBScript "default.asp" page in the root of our site. (This is a heavy, legacy page and converting it is not an option right now.) We also have a new ASP.NET MVC 2 application we want to host on the same site. Everything actually works great together! Except for one thing: requests to the root of the site (e.g., ...
Hello, new to Ruby on Rails, trying to configure the home page of my application. I don't know what I'm doing wrong, or how to configure the :home controller, but I get this error with this routes.rb file.
Routing Error - No route matches "/"
Here's routes.rb
SchoolCMS::Application.routes.draw do
devise_for :teachers, :admin
res...
I'm trying to define a route in routes.rb and I can't do anything from this Ruby on Rails routing guide that will let this error pass.
No route matches {:controller=>"devise/home"}
Here's my routes.rb source.
SchoolCMS::Application.routes.draw do
root :to => "home#index"
devise_for :teachers, :admin
resources :home, :only => ...
Hello!
I am having trouble to what i should name this in the title field...
Question is. I want to select a blogpost by entering its title, like this:
http://localhost:3254/blog/2010/10/net-programming
The title of the blogpost should be ".net programming". So i have setup a route to look for a year a month and finally a string. But h...
I have a site that uses Ninject for dependency injection and I have Routing defined within a Bootstrapper class like so:
public void RegisterRoutes()
{
Routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
Routes.IgnoreRoute("{*favicon}", new { favicon = @"(.*/)?favicon.ico(/.*)?" });
Routes.MapRoute(
...
Is there any reason why a route would be properly mapped in one environment and not another? I am deploying the exact same routing information from my local development server to a production server, and the routes are not being evaluated the same.
I have downloaded Phil Haack's Routing Debugger, and it is confirming that the routes ar...
If I submit a new user form with errors, it redirects to the index page and then renders the new page on top of it. In the controller I specify that it should just render the new action so that the user can see/fix their errors and resubmit. Is there something obvious that I am missing?
Here's the create action in my controller code:
d...
I've been converting my Rails 2.3.9 application to Rails 3.0 and everything has been going well. I've created a lot of routes with the new system so I feel like I know how to do this. However, I recently got a routing error I can't solve.
I have a users resource defined like this:
resources :users do
member do
get 'activate'
...
A call CreateIpForwardEntry returns ERROR_INVALID_PARAMETER. The PSDK documentation describes this error as:
The pRoute parameter is NULL,
SetIpForwardEntry is unable to read
from the memory pointed to by pRoute,
or one of the members of the
MIB_IPFORWARDROW structure is invalid.
I know for certain that pRoute is not NULL a...
I'm runnng Rails 2.3.8.
I set up map.resources :users in my routes.rb file.
When I run rake routes it shows:
users GET /users(.:format) {:action=>"index", :controller=>"users"}
GET /users(.:format) {:action=>"index", :controller=>"users"}
new_user GET /users/new(.:format) {:action=>"in...
I'm writing a simple Rails app with one main controller and I want to map /(:action(:id)) to this controller (basically remove the controller prefix at the beginning), but still have the path helpers I get by using map.resources.
I tried map.root :controller => 'notes', but I get an error:
undefined method `note_path' for #<ActionV...
I have a rails route that goes to the
#works for "/profile/abc"
/profile/:id
However, it breaks when the url's id is capitalized
#breaks for "/profile/Abc"
/profile/:id
Anyone knows why?
...
I have several routes defined in my Global.asax; now, when I'm on a page I need to figure out what is the route name of the current route, because route name drives my site menu. I can't find a way to get current route name.
Any help would be highly appreciated!
Andrey
...
Hi,
I'd like to track an id in the route if it's possible? This is pretty much what I want:
/groups/{id} - Show group
/groups/{id}/forum/topic/{id} - Show forum topics for the group
/groups/{id]/calendar/ - Show the calendar for the group
As you see I want to keep track of what group the user is in by the url, instead of let's say a ...
Hi,
I am working on a small CMS for fun and as part of this I register routes from a database at app start. It is possible for a user to add a route themselves. The problem is that this route is stored in the db and so isn't registered until app restart.
Is it possible to re-register routes without an app restart?
If not, how do I res...
Hi All,
I have a small form with a single textbox and a submit button.
using (Html.BeginForm("Index", "Tag", FormMethod.Post)
In my tag controller i have a method that looks like:
public ActionResult Index(string tagText)
I'm trying to figure out first how to route this so the resulting URL will look like:
http://mydomain.com/Tag...
hello everybody
my site has many many routes. since the users can add or remove pages at will, i need a way to reregister the routes from time to time
at reregister i do not want to clear the whole route cache ("RouteTable.Routes.Clear"), but i would rather go thru the table route by route, and using a certain regex on its name, decide...
I have a search box that exists on all pages. The user can enter text, and click search and they end up on the Search page with the results displayed for them.
When search is clicked, the form containing the textbox is sent off to the following route:
http://localhost:2010/search/my%20search%20term
this works. But if I put quotes aro...
I have a custom attribute that checks conditions and redirects the user to parts of the application as is necessary per business requirements. The code below is typical:
public override void OnActionExecuting(ActionExecutingContext filterContext)
{
// ...
if (condition)
{
RouteValueDictionary redirectTargetDictionary = new R...
Missing my Rails map.resources and wondering how I can implement something similar in ASP.NET MVC 2.
Thanks
...