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.
-- 
Posted via http://www.ruby-forum.com/.

--

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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.


Reply via email to