{"id":27106247,"url":"https://github.com/blockbusterdev/crud-record-practice","last_synced_at":"2025-08-03T15:32:31.225Z","repository":{"id":260580579,"uuid":"778290702","full_name":"blockbusterdev/Crud-record-practice","owner":"blockbusterdev","description":"It was built using Ruby","archived":false,"fork":false,"pushed_at":"2025-03-06T05:18:16.000Z","size":9,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-27T04:31:14.473Z","etag":null,"topics":["ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/blockbusterdev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-27T12:54:51.000Z","updated_at":"2025-03-16T14:19:48.000Z","dependencies_parsed_at":"2024-11-01T06:30:49.598Z","dependency_job_id":"a4d9b5b2-87c5-4dcf-af42-8d8825b58a3c","html_url":"https://github.com/blockbusterdev/Crud-record-practice","commit_stats":null,"previous_names":["denysostroverkh/crud-record-practice","devtwinkler/crud-record-practice","blockbusterdev/crud-record-practice"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blockbusterdev%2FCrud-record-practice","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blockbusterdev%2FCrud-record-practice/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blockbusterdev%2FCrud-record-practice/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blockbusterdev%2FCrud-record-practice/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blockbusterdev","download_url":"https://codeload.github.com/blockbusterdev/Crud-record-practice/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247542727,"owners_count":20955856,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ruby"],"created_at":"2025-04-06T19:38:38.743Z","updated_at":"2025-04-06T19:38:39.137Z","avatar_url":"https://github.com/blockbusterdev.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"ActiveRecord CRUD\n---\nIt give viewers a simple concept to make CRUD using Ruby\n\n## SWBATs\n- [ ] Get comfortable with checking `rake -T`\n- [ ] Practice setting up a table and a model\n- [ ] Practice CRUD in ActiveRecord\n- [ ] Understand the use case for global variables in Ruby\n- [ ] Use the `colorize` gem to make the console outputs pretty\n\n### Outline\nWelcome to the ActiveRecord obstacle run! Before you begin:\n1. `cd` to `starter_kit`\n2. run `bundle`\n3. run `rake db:migrate`\n4. run `rake -T`\n\nAfter the last command, you will notice a `remind_me_about:` rake task. This is a carefully created process reminder for the key deliverables for this lecture. Even if you feel confident with AR, please check the instructions every time. \n\nYou will be working in groups. Good news is that **if your database setup looks the same**, you can just send `schema.rb` and `development.sqlite` files after each person drives to hand over the database to the next person.\n\n**Hint**: For this lab, it is best that you have two terminals open: one in your VS Code and another on a split screen. Run the `remind_me_about` commands on the split screen and follow them in the VS Code.\n\n### Roadmap\nThe goal of this obstacle course is for you to practice CRUD and to end with two models (and tables) in your project: `Plant` and `Person`. You have been already given a ready `Plant` class and corresponding table. In the database, there are already a few instances of Plant class.\n1. Run `rake remind_me_about:adding_table` and follow the instructions to create a Person table with `name` attribute (string)\n2. Run `rake remind_me_about:adding_column` and follow the instructions to add `likes_plants?` attribute (boolean)\n**NOTE**: Hopefully, this will result in an error please read it and debug it together (it's a gotcha and that's fine!)\n3. Run `rake remind_me_about:rolling_back` and follow the instructions to roll back just last migration because of course everyone loves plants! \n4. Run `rake remind_me_about:adding_column` and follow the instructions to add `free_time` attribute (string), which will tell us when the person is free to water the plants and `age` (integer) \n**hint** you can do that in one file!\n\n**HEADS UP**: for all the next steps you can stay in the same `rake console` session!\n\n5. Run `rake remind_me_about:creating_an_instance` and follow the instructions to create 3 instances of `Person class` and save them to the database\n6. Run `rake remind_me_about:reading_instances` and follow the instructions to read more about each Person\n7. Oho! One of the folks just had birthday! Run `rake remind_me_about:updating_an_instance` and follow the instructions to change their age\n8. In the quarantine time, everyone is free to water the plants all day. Run `rake remind_me_about:updating_all_instances` and follow the instructions to change everyone's free time\n9. Oops, it turns out you need to water cacti 0.0 Find a plant with the \"cactus\" name and delete it from the database. Run `rake remind_me_about:deleting_an_instance` and follow the instructions.\n10. If everyone is watering the plants, it's a recipe for a disaster. All plants died. Run `rake remind_me_about:deleting_all_instances` and follow the instructions to bid the last goodbye to all the green friends.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblockbusterdev%2Fcrud-record-practice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblockbusterdev%2Fcrud-record-practice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblockbusterdev%2Fcrud-record-practice/lists"}