im trying to join 2 tables on rails but its becoming imposible to me.

My schema is:

```
 table "cursos"|
    t.string   "nombre"
    t.integer  "user_id"
  end

  table "users",
    t.string   "name"
  end

```

user.rb:

```
  class User < ActiveRecord::Base

  has_many :cursos

```

curso.rb

```
class Curso < ActiveRecord::Base
belongs_to :user

  def self.search(nameProf)

          (Cursos.joins(:users).where("users.name ilike ?",  "%#{nameProf}%").all)

  end

```

its giving me this error:

> 
> NameError in CursosController#index
>  uninitialized constant Curso::Cursos
> 
> 
> 

thanks!