routes

Page_Validators is not defined problem

Hi i am using asp.net routing when using ValidatorEnable function in javascript i got this error 'Page_Validators is not defined' how to solve this? i am using this code in my global.asax file routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.IgnoreRoute("{*allaspx}", new { allaspx = @".*\.aspx(/.*)?" }); ...

Testing rails routes: can't find ActionController::Assertions::RoutingAssertions methods

I'm trying to test the routes on my rails 2.3.4 application. There are several sites that explain how to test routes, including the rails docs, but I'm getting errors following the instructions. First, I'm assuming that these tests can be done in related unit test files. There seems to be no more obvious place, and none of the docs spec...

Trouble with Codeigniter Routes involving a query

Hey SO, I'm having a little trouble with a CodeIgniter route when there is a query (stuff after the ?) in the URI. I know it is good practice to replace queries with routes in CI, but I'm importing in a premade messageboard that already does everything with queries. This is my route: $route['messageboard/:any'] = "messageboard/index"...

Rails: Nested resources conflict, how to scope the index action depending on the called route

Imagine you have two defined routes: map.resources articles map.resources categories, :has_many => :articles both accessible by helpers/paths articles_path # /articles category_articles_path(1) # /category/1/articles if you visit /articles, index action from ArticlesController is executed. if you visit /category/1/articles, index ...

Catch all routes not working using regular expression

I know that the first route will catch most of the paths. However, this will catch also /Product/Edit/blablabla (i'm using ASP.NET Routing Debugger): public static void RegisterRoutes(RouteCollection routes) { routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.MapRoute( "Default", ...

Accessing a resource in routes.rb by using attributes other than Id

I have the following in my routes.rb map.resources :novels do |novel| novel.resources :chapters end With the above defined route, I can access the chapters by using xxxxx.com/novels/:id/chapters/:id. But this is not what I want, the Chapter model has another field called number (which corresponds to chapter number). I want to access...

Problem embedding google map with route

I got iframe with googlemap containing static location of company headquoter, i used for this google generator, and all that works fine. I got also to make possible creating routes from any location to that destinantion which is headquoter, so i picked random location, again generated iframe for this map. Everything worked fine when i ...

PHP Zend Route Config.ini - similar patterns

Hi, I'm using a configuration file to route my requests in my application. I have the following entries: routes.deal.route = "deal/:id/*" routes.deal.defaults.controller = "deal" routes.deal.defaults.action = "index" routes.deal.reqs.id = "\d+" routes.deal.route = "deal/buy/:id/*" routes.deal.defaults.controller = "deal" routes.d...

Radiant CMS custom page that accepts parameters as keywords

is this possible in radiant cms without having to create/copy the same page all over again. home/tampa/brain-injury home/orlando/brain-injury home/auburndale/brain-injury ...

Rails Routing: what is the difference between :conditions and :requirements in routing?

When should I use :conditions or :requirements in rails routing? Here are two examples: :conditions map.connect "/foo/:view/:permalink", :controller => "foo", :action => "show", :view => /plain|fancy/, :permalink => /[-a-z0-9]+/, :conditions => { :method => :get } end :requirements map.connect 'posts/index/:page', ...

How do I route user profile URLs to skip the controller?

Right now my user profile URLs are like so: http://example.com/users/joeschmoe And that points to the show method in the user controller. What I'd ideally like to do is offer user profile URLs like this: http://example.com/joeschmoe So, what sort of route and controller magic needs to happen to pull that off? ...

Zend Framework: How and where to create custom routes in a 1.8+ application?

I've never created a custom route before, but I finally have a need for one. My question is: How can I create a custom route, and where should I create it? I'm using Zend Framework 1.9.6. ...

Is it better to use routes or mod_rewrite to forward old URLs?

I recently changed some URLs in my Rails app and am curious if I'm better off using routes + controllers + redirect_to to forward the old URLs, or just use .htaccess with Apache's mod_rewrite? I'm using Apache + Passenger so htaccess files work, but was curious if there was a standard for this sort of thing. FWIW, the URLs were changed...

rails routes params find for a form

Hello, I am having a bit of trouble with my rails application. It short, its a social networking app where users have a profile, have submissions, and can comment on submissions. My routes are as follows: map.connect '/:username', :controller => 'users', :action => 'show' map.connect '/:username/:id', :controller => 'submissions', :...

Order confirmation page in rails.

Hi guys, I've been trying to create an order confirmation page for my rails app, and am not quite sure how to go about it in a restful way. There were a few answers on this question that got me halfway there, but the problem was that I wasn't quite sure how to set up the form in the rails view so that it would take the user to a confir...

make dynamic routes from content

I am trying to setup dnamic routes in my rails application. i.e. I have a acts model that has a name attribute. name:string. What I a trying to do is use that name as my url. in my route if have map.connect 'blacktie/:id', :controller => 'acts', :action => 'show', :id => 3 That takes me to http://0.0.0.0:3000/blacktie I know...

Codeigniter Routes for filename with extension

I am using codeigniter and its routes system successfully with some lovely regexp, however I have come unstuck on what should be an easy peasy thing in the system. I want to include a bunch of search engine related files (for Google webmaster etc.) plus the robots.txt file, all in a controller. So, I have create the controller and upda...

Rails Routing Error

Weird error. I'm a newby to rails. From a new install of rails I connected to an oracle db and then ran: jruby script/generate scaffold job oid:integer userid:integer name:string status:integer Without doing anything else I started up the server and entered a new job and then I get this error: Routing Error job_url failed to genera...

rails routes question - how to take all parameters to end of URL?

Hi, In the rails config/routes.rb file, how do I ensure that the first route here takes all characters after the initial /site and uses this for this route (assigning it to :path). map.connect 'sites/:path', :controller => 'xxx', :action => 'yyy' map.connect ':controller/:action/:id' In other words how to avoid any URL that goe...

Rails custom routing for auto-login

I want to set up auto-login by giving the user a link/key they can use like http://domain.com/4yT67rw. The last 7 digits are random and assigned to the user model. Is it possible to do this with custom routing? I imagine it would have to be something like a regex to detect that it is a key and not a model name or error. Would be grea...