Displaying 2 results from an estimated 2 matches for "departmentscontroler".
Did you mean:
departmentscontroller
2006 Aug 14
1
Rest, routes, path_prefix and default params
...ction/:id'', :id => nil, :action => ''index''
end
in application.rb, I have
class ApplicationController < ActionController::Base
protected
def find_company
@company = Company.find(params[:company_id])
end
end
And in departments_controller.rb
class DepartmentsControler < ActionController::Base
before_filter :find_company
end
In companies_controller.rb
I have
class CompaniesController < ActionController::Base
protected
def find_company
@company = Company.find(params[:id])
end
end
-------------- next part --------------
An HTML attachment was...
2006 Feb 24
5
Controller Methods gets called twice on single invocation
I have no idea why this is happening but it seems like every method on
my controller gets called twice. Here is what it looks like when I call
a list using the scaffold code
==========================
Processing DepartmentsController#index (for 127.0.0.1 at 2006-02-24
01:05:00) [GET]
Parameters: {"action"=>"index", "controller"=>"departments"}