Displaying 3 results from an estimated 3 matches for "some_things".
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", :action...
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
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