» Home » routes » Page 1
Pylons/Routes Named Routes vs. Keyword Routes and Subdomains
Category : 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',


View Replies


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

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


https://gist.github.com/2492118


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
end

Request a


View Replies


Playv2.0.3: SecureSocial Module Routes are used (instead of main routes) after push to heroku
Category : 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


View Replies


No route matches error but rake routes finds it, Rails.application.routes recognises it
Category : 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

View Replies


about rails' routes, adding collection routes to restful resources won't generate named route helpers?
Category : Coding

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

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?


View Replies


catching wild card route for missing routes, doesn't work when having additional routes files
Category : 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'

View Replies


how to define common routes or subsequent routes in moustache / ring
Category : 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

View Replies


Rails engine: rake routes show its routes but on rspec execution “No route matches” is thrown
Category : 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 }
end
end<

View Replies


Backbone Routes / View <= Put all my routes inside Views
Category : 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.


AppRoutes.js


N

View Replies


Adding HTTP Basic Authentication to some routes in routes.rb
Category : 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


routes.rb


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

View Replies


Next
2012 / 2017 Copyrights BigHow , All Rights Reserved .