At the end of the day you should
- Feel comfortable in the terminal
- Know about ERB (Embeded Ruby) and how to use it
- Know how to start a new Rails project
- Have your project online
| DV.Search.json = {"results":[{"active":true,"approved":true,"averageResponseTime":7,"calendarModified":1439592463000,"cancellationPolicy":"flexible","id":148858,"instantBookNewGuest":false,"instantBookRepeatGuest":false,"lastLogin":1443752666000,"location":{"fullAddress":"2 Alphonse St, Saint Isidore, ON, Canada","city":"Saint Isidore","country":"CA","latitude":45.385898,"longitude":-74.9059569,"state":"ON","zipcode":"K0C 2B0","neighborhood":null,"propertyType":"house","outdoorArea":"large","residentDogCount":2,"updatedAt":1443752700000},"maxDaycareDogsAllowed":3,"maxDogsAllowed":4,"newMentorReviewed":false,"profile":{"boardingImage":"148858.1379375977.5371.jpg","description":"I offer dog sitting in my own home situated in St. Isidore, Ontario. My assistants are my 5 year old Rottweiller and my 4 year old Boxer. During their stay with us your special canine friend will ...","facebook":null,"hasDogBoardingPhotos":true,"name":{"first":"Leslie-Ann","last":"B"},"profileImage":"148858.1381539913.1439.jpg","profil |
| { | |
| "font_size": 15.0, | |
| "ignored_packages": | |
| [ | |
| "Vintage" | |
| ], | |
| "tab_size": 2, | |
| "translate_tabs_to_spaces": true, | |
| "trim_trailing_white_space_on_save": true, | |
| "word_wrap": "true" |
| [ | |
| { "keys": ["super+l"], "command": "show_overlay", "args": {"overlay": "goto", "text": ":"} } | |
| ] |
| ActsAsTaggableOn::Tag.includes(:taggings).where("taggings.taggable_type = 'Question'").select("DISTINCS tags.*") |
| # TODO Still don' know what this controller is for and what to do wiith it... |
| def admin | |
| if read_attribute(:admin) == "t" || read_attribute(:admin) == "1" | |
| true | |
| else | |
| false | |
| end | |
| end | |
| def admin=(value) |
| [ | |
| { "keys": ["super+l"], "command": "show_overlay", "args": {"overlay": "goto", "text": ":"} } | |
| ] |
| has_many :enrollments, class_name: "CourseEnrollment", conditions: "course_enrollments.role='student'", dependent: :destroy | |
| has_many :student_enrollments, class_name: "CourseEnrollment", conditions: "course_enrollments.role='student'", dependent: :destroy |
| def email_must_be_uniq | |
| user = User.find_by_email(email) | |
| if user.present? && user.id =! self.id | |
| errors.add(:email, "is already taken") | |
| end | |
| end |