Displaying 20 results from an estimated 20000 matches similar to: "Can''t override routing code"
2009 Nov 10
10
Un-recognised routes that do exist, using namespaces & subdomain checking
I''m getting really cheesed off with RSpec not matching some of my
routes when controller testing when I have subdomain checking
(courtesy of subdomain-fu) on namespaces. These routes appear in the
rake routes output, and work fine via HTTP requests .
The really annoying thing is it''s working fine for routes that aren''t
at the root of the namespace.
E.g. say I have
2006 Aug 03
1
routeset mapper problem
hello,
I installed a rails app on dreamhost, which I''m building based on the
Comatose plugin, and it went smoothly for the first version.
Now I uploaded a second version where I broke down the Comatose code
into a regular rails app, which works alright locally, but can''t get
routing to work the same as before on the server. I believe I
double-checked all gotchas mentioned
2011 Jun 09
1
subdomain based namespacing makes RSpec incorrectly state that the route doesn't exist
Hello,
I''m doing namespace routing based on subdomain, rather than path, so
that http://admin.example.com/pages leads to app/controllers/admin/
pages_controller.rb. Cucumber is following this fine, but RSpec is
complaining that the requested route doesn''t exist even though "rake
routes" shows the route. When I add a standard namespace below the
"scope :admin"
2006 Jul 11
1
Dynamically setting the session domain?
Does anyone know a way to dynamically change the session_domain option
of ActionController::CgiRequest? I want to have a login section on an
index page (www.example.com) that takes a subdomain, username,
password, authenticates, then redirects to
http://#{subdomain}.mysite.com.
I need to set the session_domain option (to the subdomain) dynamically
so the cookie can be read when the user arrives
2011 Jun 22
3
Status of Rails.application.routes.recognize_path()
Sorry if this question isn''t really "Ruby on Rails: Core" material. I feel
it is, at least kind-of (also, I first tried asking in "Ruby on Rails: Talk"
to no avail.).
So, while writing a gem (engine) for rails, I found that I needed to have my
app (in a pre-filter) directly query the router. In the "old" days, this was
done using
2006 Aug 09
0
recent changes in routes
I''m writing a plugin that automatically creates a named route buy
hijacking RouteSet''s draw method. This no longer seems to work in
edge rails. Anyone know what changes in routes effected this and what
the preferred way would be now to automatically include route?
Here''s the code that used to work:
class ActionController::Routing::RouteSet
alias_method
2007 Jan 24
0
problems with themes in rails 1.2.1 -> named_route
i saw someone mentioned this somewhere else (1), but i wanted to make
sure that this wasn''t something that was going to cause me alot of grief
later..
i have been using the theme plugin (2) on several projects..
i updated to 1.2.1 today, and upgraded my mongrel to the latest one..
when i try running mongrel after updating my project, i get the
following error:
2011 Jun 21
0
Status of Rails.application.routes.recognize_path()
This might be more a question for the guys in the "Ruby on Rails: Core"
group, but I''ll try it out here first...
So, while writing a gem (engine) for rails, I found that I needed to have my
app (in a pre-filter) directly query the router. In the "old" days, this was
done using ActionController::Routing::Routes.recognize_path(). My 2nd
edition of "Agile Web
2006 Feb 08
2
Adding routes via a plugin...
I have a plugin that I am working on that will as part of its distribution
contain a controller. I would like to be able to add a route for it in the
plugin''s init.rb so that when the plugin is loaded, the route will
automatically be registered without having to force the user to edit
routes.rb or even make a rake task to do it for them.
I saw the following code in one of the SVN
2006 Mar 10
0
WEBrick crashing
ruby 1.8.2 (2004-12-25) [i386-mswin32]
latest version of edge rails - patched to make the server work with
win32 (http://dev.rubyonrails.org/ticket/4139)
On some pages WEBrick is crashing with the following:
d:/programming/ruby/lib/ruby/1.8/profiler.rb:27: You have a nil object
when you
didn''t expect it! (NoMethodError)
You might have expected an instance of Array.
The error occured
2007 Oct 26
3
Specing with Subdomains as Account Keys
How do you go about implementing and rspecing subdomains as account
keys? I''m sure that this must be an issues for others as well.
So I have an app using subdomains as account keys. The Application
Controller sets up @current_company in a before filter. Everything is
done within the context of the @current_company.
After reading about Demeter''s Revenge
2011 Apr 21
1
Rails 3 Foreign Domain routing - cannot get this to work!
Hello,
I''m trying to build an app (mysuperapp.com) that allows users to create
an account in which a default subdomain (IE: joeshmoe.mysuperapp.com) will
be
created as their homepage. In their profile settings, I also want to give
them the ability to add their own domain name so their homepage now can be
joeshmoe.com. I know this is possible in rails w/ plugins like
subdomainfu
2006 Jun 21
4
Simple Subdomain Routing
Hey all,
I hope this is a relitively simple question, but I have not been able to
arrive at a workable solution for myself.
What I''m wanting to do is a very simple pattern match on a subdomain:
www.* forwards to mydomain.com/www_controller
and everything else forwards to mydomain.com/other_controller
The idea is to forward logged in users to username.mydomain.com, but all
the
2012 Oct 18
1
routing issue with mounted engine - Rails 3.2.8
I mounted the Forem::Engine in my app
MyApp::Application.routes.draw do
scope "/:locale" do
...
resources :sites, :only => [:none] do
get ''home'', :on => :collection
get ''events'', :on => :collection
end
..
mount Forem::Engine, :at => "/forums", :as => :forums,
constraints: lambda { |r|
2008 Jun 19
5
How do you create one session cookie for multiple subdomains
I am using the restful authentication plugin and am always prompted to
login if a different subdomain is accessed. I have found a couple rails
"solutions", but none of them seem to work:
# development.rb
1. ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS[:session_key]
= ".localhost"
2. ActionController::Base.session_options[:key] = ".localhost"
Does anyone
2006 Apr 04
1
subdomain routing
According to the wiki (http://wiki.rubyonrails.org/rails/pages/Routes)
you can handle subdomain routing in routes.rb. Like this:
with_options :requirements=>{:subdomain=>''first.com''} do
map.connect '''', :controller => "first/catalog"
map.connect ''featured'', :controller => "first/catalog",
2013 Jun 04
1
bug in samba-tool w.r.t. (sub)domains
Hi all
I'm trying to import our bind dns data for our domain into samba4 using
sambatool. Unfortunately, our domain has lots of (unnecessary)
subdomains, but that's hard to revert after a long time. So I will have
to parse the bind data and do a zonecreate for each subdomain that comes
out of bind. I can deal with this, but it's cumbersome :-(
The bug I'm talking about is
2006 Feb 13
1
dynamically generating a controller and appropriate routing
I''m working on a library similar to acts_as_taggable. I''d like it to be a
simple, one file drop-in: i.e., put my_library.rb into RAILSROOT/lib/ and
have everything work. However, the library requires a controller to render
some stuff, so I need to be able to create the controller class, set the
routing, and extend the controller at run-time from within my_library.rb.
I have code
2007 Jan 17
8
Mocha Mock''s hanging on after test run?
Hi guys,
I''m running mocha (0.3.2) against Rails core and just found an issue
where the mock doesn''t go away after the test is run.
For example:
def test_reset_bang_doesn_reinstall_named_routes
ActionController::Routing::Routes.named_routes.expects(:install).never
@session.reset!
end
def test_zzz
puts ActionController::Routing::Routes.named_routes.inspect
2007 Jun 02
2
Server-side Image Maps in Rails
I''ve been working on an idea to use a server-side image map to allow
users to click anywhere in an area and have a new element appear at the
location they clicked. Everything was going well, until it came time to
connect the routing map. Here are the relevant parts:
In the view, the map is created by --
<%= link_to(image_tag(''floor_plan.png'', :width =>