search for: current_compani

Displaying 3 results from an estimated 3 matches for "current_compani".

Did you mean: current_company
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
2007 Oct 05
7
Easy AR association stubbing
I''ve added a method to the mock class that makes it pretty easy to stub associations in rails. I''ve been using it for awhile and it seems to cut down on a lot of setup code for the controller and model specs that use associations. #before @person = mock_model(Person) posts = mock(''post_proxy'') posts.stub!(:build).and_return(mock_model(Post, :save => true))
2010 Mar 08
0
Nested Resources + Namespace + Friendly URL
Hi, all In my rails app I have a controller called Dashboard::MenusController with a namespace dashboard. I have a model Company too, where its has_many :menus So, I have the code above in my route.rb map.namespace (:dashboard) do |dashboard| dashboard.resources :companies, :has_many => :menus end With this route I can create a new menu by: dashboard/companies/1/