» Home » routes » Page 1
Pylons/Routes Named Routes vs. Keyword Routes and Subdomains
by dEXterz in Programming Languages

Subdomain behavior is not working as I expect in my Pylons project. Can someone provide some insight? I was using a named route and received back a URL that did not contain my current subdomain:

I have the following rule defined on my mapper:

map.sub_domains = True
map.connect('openid_verify', '/verify', controller='oid',

How to avoid caching of routes with DHH's monkey patch about distributing routes in multiple files
by socurious in Programming Languages

I'm using Rails 3.1 and DHH's monkey patch about distributing routes in multiple files:


So when I change routes in one of the routes of the routes directory I have to deactivate a routes sub file like config/routes/users.rb:

MyApplication::Application.routes.draw do
#draw :users

Request a

Playv2.0.3: SecureSocial Module Routes are used (instead of main routes) after push to heroku
by S Hall in Programming Languages

I have a rather simple app that works fine locally, uses the correct routes, that is: /conf/routes for the majority of app routes, and /module/securesocial/conf for routes appropriate to that module.

But once I post to heroku, only the securesocial routes are used, so I receive an error message "Action not Found For request GET /" <-- or any route defined in the standard route fi

No route matches error but rake routes finds it, Rails.application.routes recognises it
by Javier Pitalua in Programming Languages

Strangely when I include "resources :blogs" to my routes.rb I get the following error for any other path I try to reach:

No route matches {:action=>"show", :controller=>"blogs"}

The only path I don't get this error for is the "/blogs/:id(.:format)" itself.

Rake routes ("show" for "blogs" in line 5):

blogs GET /blogs(.:f

catching wild card route for missing routes, doesn't work when having additional routes files
by SnuggleTheBear in Programming Languages

I implemented a simple custom errors solution.
this one: http://ramblinglabs.com/blog/2012/01/rails-3-1-adding-custom-404-and-500-error-pages

everyhing is working fine except the missing routes in the routes.rb file..

in order to get to my error_controller when there is a missing route i did the wildcard solution: match '*not_found', to: 'errors#error_404'

about rails' routes, adding collection routes to restful resources won't generate named route helpers?
by scosant in Coding

namespace :admin do
resources :posts do
collection do
get 'whatever'

I was expect that will generate 'whatever_admin_posts_path' helper method, but it didn't.
It's there something wrong with my codes? Or a bug in rails?

how to define common routes or subsequent routes in moustache / ring
by Vasiliy in Development Tools & Services

I have two moustache routes basically the http://locahost and http:localhost/ route which point to the same function -

[""] (-> (index) response constantly)
["/"] (-> (index) response constantly)

How do I -

Is it possible to specify both of these routes together such as
["" "/"] as they follow each other ?
Is it possible to r

Rails engine: rake routes show its routes but on rspec execution “No route matches” is thrown
by bicho44 in Programming Languages

I'm trying to test a controller that is inside an engine my application is using. The spec is not within the engine, but in the application itself (I tried to test within the engine but also had problems).

My engine has the following routes.rb:

Revision::Engine.routes.draw do
resources :steps, only: [] do
collection { get :first }

Backbone Routes / View <= Put all my routes inside Views
by Lex Viatkine in Web Design

Is it reasonable to set the routes inside the view and proceed the events there ?
Want to use a logic to pass the action-url from my views and call a function as callback from my AppRoute Class.

I try to avoid strings as event names and i like to have it easy extensible. So can can create a
view without change the AppRoutes logic.



Adding HTTP Basic Authentication to some routes in routes.rb
by atomicstack in Programming Languages

I want to add HTTP Basic Authentication to a some of my routes in my routes.rb file.

I got the idea from http://asciicasts.com/episodes/271-resque


Coderbits::Application.routes.draw do
resources :snippets
root :to => "snippets#new"
authenticate :admin do
mount Resque::Server, :at


Privacy Policy - Copyrights Notice - Feedback - Report Violation - RSS 2017 © bighow.org All Rights Reserved .