Problem with Active Query condition

I have the following code for an active record condition in a controller

  @thus_section = Section.all( :conditions => [ "url_section = ?", params[:ssection] ] )

And when I try to goto to the webpage asociated with it I get the following error:


in UpcomingEventsController#index

wrong number of arguments (given 1, expected 0)

I was using Active Record Query Interface — Ruby on Rails Guides to work out how to do it.

What am I doing wrong?

In order:

1. not having a test for the method in the first place 2. not showing us the complete code for that method 3. not showing us the full log entry and stack trace


You can do it like below

Section.find(:all, :conditions => { :url_section => params[:ssection] } )

Actualy you missed the main thisg, not saying whitch version of rails I was using. I was using old syntax for 9I think 2.3) and was using rails 5.