There was an error while loading. Please reload this page.
In total, a code school is comprised of a CodeSchool record, and an associated Location record.
CodeSchool
Location
Here is an example of how to create a new CodeSchool, and a new Location for that school, in the rails console:
rails console
code_school = CodeSchool.create( name: "Wyncode Academy", url: "http://wyncode.co", logo: "https://raw.githubusercontent.com/OperationCode/operationcode_frontend/master/src/images/codeSchoolLogos/wyncode.jpg", full_time: true, hardware_included: false, has_online: false, online_only: false, notes: nil, mooc: true ) code_school.locations.create( va_accepted: true, address1: "549 NW 28th Street", address2: nil, city: "Miami", state: "FL", zip: 33127, )
Each of these models have required attributes. They are:
CodeSchool required attributes:
:name, :url, :logo
Location required attributes:
:address1, :city, :state, :zip