I have a controller (employee) with it's model and view. Now I need to
write another controller (emp) which would not have any model or view.
This emp controller should be able to invoke all the methods of
employee controller.And eventually be able to represent all the
relevant information.
I have also a dependent controller of 'employee' which is 'account' .
I have set up routes as per that.
# in routes.rb
-----------------------------------------
resources :employees do
resources :accounts
end
and, resources :emp, :as =>"employees" do
resources :acc , :as=>"accounts"
end
------------------------------------------
POST on /emp/ would be as good as a POST on /employees/
or GET on /emp/1/edit should work as GET on /employees/1/edit
or GET on /emp/1/acc should be equivalent to GET on /employees/1/
accounts
I was thinking how to write the emp controller.Please help.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
No comments:
Post a Comment