Displaying 3 results from an estimated 3 matches for "some_th".
Did you mean:
someth
2009 Nov 10
10
Un-recognised routes that do exist, using namespaces & subdomain checking
...;'t
at the root of the namespace.
E.g. say I have
map.namespace :foo, :path_prefix => '''', :conditions => { :subdomain =>
''foo'' } do |foo|
foo.bars, :controller => ''bars'', :only => [:show] do |bar|
bar.resources some_things ....
end
foo.resources :monkeys
end
My specs for bars/some_things all resolve the routes fine (e.g. doing
get :index etc.)
Any spec that tries to hit monkeys/ give me a no route matches even
though these routes exist
No route matches {:controller=>"foo/monkeys", :ac...
2006 Jun 04
6
Activerecord relations.
I''ve got two tables set up - Things and Users where Users have many
things and Things belongs to Users.
They''re connected by Things.user_id => User.id and Things.updated_by_id
=> User.id both in the Things model using Belongs_to and custom foreign
key for one of them.
Problem is when I''ve got the updated_by_id belongs_to I can''t add Things
using
2006 Feb 13
1
dynamically generating a controller and appropriate routing
...9;t
seem to take effect. When testing via the webrick server, I get an
unrecognized route error.
What I have in my_library.rb is something like the following:
say I''ve generated the following controller from within my_library.rb:
class ASampleController < ActionController::Base
def some_thing
render_text "hello world!"
end
end
and also from within my_library.rb I have the following code to add a route:
ActionController::Routing::Routes.connect ''/show/:model_name/:id'',
:controller => ''ASampleController'', :action => :model_nam...