{"id":23228937,"url":"https://github.com/jaredsmithse/dummy_users","last_synced_at":"2025-09-14T15:10:35.875Z","repository":{"id":151518252,"uuid":"10976306","full_name":"jaredsmithse/dummy_users","owner":"jaredsmithse","description":"Playing with user authentication in Sinatra for the first time.","archived":false,"fork":false,"pushed_at":"2013-06-27T00:09:19.000Z","size":124,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-05-26T17:54:25.555Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/jaredsmithse.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}},"created_at":"2013-06-26T19:00:23.000Z","updated_at":"2013-06-27T00:09:19.000Z","dependencies_parsed_at":"2023-04-06T09:15:49.290Z","dependency_job_id":null,"html_url":"https://github.com/jaredsmithse/dummy_users","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jaredsmithse/dummy_users","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredsmithse%2Fdummy_users","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredsmithse%2Fdummy_users/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredsmithse%2Fdummy_users/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredsmithse%2Fdummy_users/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jaredsmithse","download_url":"https://codeload.github.com/jaredsmithse/dummy_users/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredsmithse%2Fdummy_users/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275121673,"owners_count":25409083,"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","status":"online","status_checked_at":"2025-09-14T02:00:10.474Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-12-19T01:15:37.142Z","updated_at":"2025-09-14T15:10:35.842Z","avatar_url":"https://github.com/jaredsmithse.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"Dummy Users\n================\n\nWe're going to build a simple version of Craigslist. This will be your first web application that uses multiple models.\n\nKeep in mind that this is not substantially different than a command-line version. Instead of reading in command-line arguments, we read in URL parameters. Instead of printing to the console, we print HTML and CSS.\n\nWe'll only have two models in a one-to-many relationship; no different than your command-line TODO app.\n\nAs with all the Sinatra apps, start with the DBC Sinatra Skeleton\n\n\u003ch2\u003eLearning Goals\u003c/h2\u003e\n\u003cul\u003e\n\u003cli\u003eDeepen your ActiveRecord skills around associations.\u003c/li\u003e\n\u003cli\u003eLearn how to implement all four parts of CRUD: create, read, update, and delete.\u003c/li\u003e\n\u003c/ul\u003e\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\u003ch2\u003eObjectives\u003c/h2\u003e\n\u003ch3\u003eWireframe With Your Pair\u003c/h3\u003e\nNever heard of a web wireframe? Check out what Wikipedia has to say. TL;DR -- figure out what pages your app needs, then sketch-out the basic layout of each and the connections between them.\n\nThe application will have two core models: `Post` and `Category`. A `Post` belongs to a `Category` and a `Category` has many `Posts`.\n\nA `Category` is something like \"Apartment Rentals\" or \"Auto Parts.\"\n\nSit down and work out with your pair what pages you're going to be building. At a minimum, you'll need:\n\n1. A page that lists all the categories\n2. A page that lists all the postings in a given category\n3. A page that lets someone create a new posting in a given category\n4. A page that lets someone who has created a page return to edit/update the page\n\nIf you're never used Craigslist, it doesn't have any kind of user authentication. Instead, when someone creates a post they're given a special \"secret\" URL that grants them powers to edit that post that looks like\n```\nhttp://craigslist.com/post/123/edit?key=kjansd812\n```\nThe key is randomly generated. The person is given their \"edit URL\" after they successfully create a post. Anyone with this URL can edit the post.\n\nThink about this like a real web application you might want someone to use. What fields should a `Post` have?\n\nA price, probably. What should the column type of a money-related column be?\n\nAn email, so the poster could be contacted. Title, description, etc.\n\nSpend time enumerating the pages, deciding what should be displayed on each one.\n\u003ch3\u003eController Structure\u003c/h3\u003e\nOur controller structure will be more complicated. We'll want URLs that look like `/categories/123` and `/posts/456`. We'll be using both `get` and `post` methods.\n\nTo create a new `Post`, for example, we'd want to submit an HTML form using the POST http method to the /posts URL, like so:\n```HTML    \n\u003cform action=\"/posts\" method=\"post\"\u003e\n  \u003c!-- other form elements here --\u003e\n\u003c/form\u003e\n```\nand to update an existing record (say with id 1234) we'd want to `post` to `/posts/1234`.\n\nControllers should either redirect to another URL or render a page. Typically, a page loaded via HTTP POST will redirect to an appropriate URL if a request succeeds and render an error page, otherwise.\n\u003ch3\u003eShip it!\u003c/h3\u003e\nMake sure the core features work. We should be able to download your app, run it, and do the follow:\n\n1. Choose a category to browse\n2. View all postings in a particular category\n3. View a particular posting\n4. Create my own posting\n5. Edit my postings by using the \"secret key\" that I get after creating my posting\n\n\u003ch3\u003eAdd One Final Feature\u003c/h3\u003e\nOne last feature to add: the \"this is awesome\" feature. What does awesome mean? It can mean anything. The code is awesome, there are new awesome features, the design is awesome.\n\nWe'll be picking one pair at random tomorrow morning to show off their version of Craigslist. They'll get a full-on UX and code review.\n\nThis isn't a race; there's no finish line, only a deadline (tomorrow, duh!). Take the time to make this application something you're proud of. It doesn't have to be flashy — it could be a difficult technical hurdle you overcame.\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaredsmithse%2Fdummy_users","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaredsmithse%2Fdummy_users","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaredsmithse%2Fdummy_users/lists"}