{"id":15101469,"url":"https://github.com/sjproctor/learn-full-stack-rails","last_synced_at":"2026-01-18T22:33:38.709Z","repository":{"id":230260235,"uuid":"778905019","full_name":"sjproctor/learn-full-stack-rails","owner":"sjproctor","description":"Instructional project: Full-stack Ruby on Rails","archived":false,"fork":false,"pushed_at":"2024-03-28T19:17:56.000Z","size":33,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-10T21:38:54.901Z","etag":null,"topics":["restful","rspec","ruby","ruby-on-rails"],"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/sjproctor.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-28T16:32:52.000Z","updated_at":"2024-04-03T00:00:43.000Z","dependencies_parsed_at":"2024-03-28T18:31:26.067Z","dependency_job_id":"09f24aca-7f9e-47af-b1f7-a84412f0253b","html_url":"https://github.com/sjproctor/learn-full-stack-rails","commit_stats":{"total_commits":5,"total_committers":2,"mean_commits":2.5,"dds":"0.19999999999999996","last_synced_commit":"404a67c58e63a29a642ecb7f701e895ee606fda5"},"previous_names":["sjproctor/learn-full-stack-rails"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sjproctor%2Flearn-full-stack-rails","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sjproctor%2Flearn-full-stack-rails/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sjproctor%2Flearn-full-stack-rails/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sjproctor%2Flearn-full-stack-rails/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sjproctor","download_url":"https://codeload.github.com/sjproctor/learn-full-stack-rails/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247325648,"owners_count":20920713,"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":["restful","rspec","ruby","ruby-on-rails"],"created_at":"2024-09-25T18:23:47.563Z","updated_at":"2026-01-18T22:33:38.703Z","avatar_url":"https://github.com/sjproctor.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rails Full-stack 3/27/2024\n\n### Purpose\n\nThis application was crafted for an instructional demo of full-stack Rails. The goal was to explore RESTful routes and understand data flow in the MVC architecture.\n\nThe notes below describe the step-by-step build process so the students could model the workflow.\n\n### App Configurations and Setup\n\n- added RSpec gem\n- generated model: `rails g model Herb name:string watered:string`\n- ran the migration\n- added a few herbs directly in the Rails console\n- generated controller: `rails g controller Herb`\n\n### RESTful Routes\n\n### Index\n\n- controller - active record query for all the herbs\n- route - get request, added alias, and root to index\n- view - iterated over the active record array to display herb names\n- notes - erbs tags with `=` display content to the browser, no equal sign don't display\n\n### Show\n\n- controller - active record query to find one herb by params\n- route - get request, added alias, required param of id `Parameters: {\"id\"=\u003e\"2\"}`\n- view - parsed into the herb and displayed name and watered values\n- link from show to index\n- link from index to show requires a param\n\n```ruby\n\u003c%= herb.name %\u003e\n\u003c%= link_to herb.name %\u003e\n\u003c%= link_to herb.name, herb_path(herb) %\u003e\n```\n\n### New\n\n- controller - active record connection to the herb model\n- route - get request, added alias, reorder the routes because new is more specific than show\n- view - form_with helper to create a form with text input and radio buttons\n- link from index to new\n- link from new to index\n\n### Create\n\n- controller - active record query to create, added strong params method that limits what the user has access to in the database\n- route - post request\n- view - no inherent view with post, added submit button to the form and redirect on successful creation of herb\n\n### Edit\n\n- controller - active record query to find one herb by params\n- route - get request, added an alias, required param for edit\n- view - c/p from the new form, minor text changes\n- link from edit to index\n- link from show to edit that specific herb\n\n### Update\n\n- controller - active record query to find one herb by params, called strong params method\n- route - patch request, require a param for update\n- view - redirect to the show page if the update is valid\n\n### Destroy\n\n- controller - active record query to find one herb by params, called the destroy method, redirect to index after deleting\n- route - delete request, require a param for destroy, added alias to use on the link\n- view - added a link on the show page and called the alias with the data to specify a delete action\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsjproctor%2Flearn-full-stack-rails","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsjproctor%2Flearn-full-stack-rails","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsjproctor%2Flearn-full-stack-rails/lists"}