relating controllers... How to?

Hi, anyone can help me?
I have 2 model : Error and Error Detail

Error: Error_name, tot_errors
Error Detail: Error_name , details for error

e.g.

Error = Error_type1 | 5
Error Detail = 5 lines with Error_name=Error_type1

I want to show this:

Ro wrote:

then I put in " Show Error Detail Link " a <%= link_to
"Show", :controller => "error_details" ,:action =>
"index", :task_errore => error.type %>
and create method in error_details controller as

def index(task_errore)
    if !session[:user_id]
      redirect_to :controller => 'user', :action => 'login'
    else

        @ngn_errors = NgnError.find(:all, :conditions =>[" task_errore
= nvl(?, task_errore) ", task_errore ])

    end
end

But when I click on link he say me:
ArgumentError in NgnerrorsController#index

wrong number of arguments (0 for 1)

Controller actions don't take arguments. You need to pass :task_errore
in the params hash (params[:task_errore]).

def index
  task_errore = params[:task_errore]
  ...
end

Or something to that effect.

Thank you! this works!!!!

Happy new year!