/namespace_test

Example with a namespaced model

Primary LanguageRuby

Namespace test

Created a new rails project, then:

  1. ‘rails g model plan`

  2. ‘rails g model student/plan

  3. ‘rake db:migrate`

  4. ‘rails c`

  5. Then in the console

    a = Plan.create
    b = Student::Plan.create
    a.class
    => Plan(id: integer, created_at: datetime, updated_at: datetime)
    b.class
    => Student::Plan(id: integer, created_at: datetime, updated_at: datetime)

Werks for me!