Problem with DataMapper (with Sinatra)

I am developing a very simple forumapplication and I have this bit of
code here which executes when you click on a forumsections name. The
page :section is supposed to list all the threads that belongs to the
section. It directs me to the page without errors but for some reason
the @threads variable is empty even though the sections do have threads
to list. Is it wrong do use id to select threads in
Forumthread.all(section: x)?

get ‘/section/:x’ do |x|
@section = Section.first(id: x)
@threads = Forumthread.all(section: x)

erb :section