{"id":20340163,"url":"https://github.com/albasyir/learn-ruby-on-rails","last_synced_at":"2026-06-04T02:31:12.592Z","repository":{"id":40009049,"uuid":"456472978","full_name":"albasyir/learn-ruby-on-rails","owner":"albasyir","description":"todo list only for learning","archived":false,"fork":false,"pushed_at":"2023-03-08T23:47:15.000Z","size":64,"stargazers_count":2,"open_issues_count":6,"forks_count":0,"subscribers_count":1,"default_branch":"production","last_synced_at":"2025-01-14T18:09:38.661Z","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/albasyir.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":"2022-02-07T11:14:46.000Z","updated_at":"2022-02-13T05:07:13.000Z","dependencies_parsed_at":"2025-01-14T17:29:09.890Z","dependency_job_id":"c9199621-d6b3-415e-a046-e258cff802c9","html_url":"https://github.com/albasyir/learn-ruby-on-rails","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/albasyir%2Flearn-ruby-on-rails","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/albasyir%2Flearn-ruby-on-rails/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/albasyir%2Flearn-ruby-on-rails/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/albasyir%2Flearn-ruby-on-rails/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/albasyir","download_url":"https://codeload.github.com/albasyir/learn-ruby-on-rails/tar.gz/refs/heads/production","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241867649,"owners_count":20033815,"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":[],"created_at":"2024-11-14T21:20:04.942Z","updated_at":"2026-06-04T02:31:12.586Z","avatar_url":"https://github.com/albasyir.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simple Ruby On Rails Blog App\nThis for learning purpose and just for fun, there's no real business logic in this project, just a simple blog app.\n\n## My Note\nthis is my note for remember something like design pattern or \"best practice\" for **Ruby On Rails**\n\n### Form Rendering\nRails can create form by model it self, example \n```erbruby\n\u003c%= form_with model: [ @article, @article.comments.build ] do |form| %\u003e\n  \u003cp\u003e\n    \u003c%= form.label :commenter %\u003e\u003cbr /\u003e\n    \u003c%= form.text_field :commenter %\u003e\n  \u003c/p\u003e\n\n  \u003cp\u003e\n    \u003c%= form.label :body %\u003e\u003cbr /\u003e\n    \u003c%= form.text_area :body %\u003e\n  \u003c/p\u003e\n\n  \u003cdiv\u003e\n    \u003c%= form.label :status %\u003e\n    \u003c%= form.select :status, %w[public private archived] %\u003e\n  \u003c/div\u003e\n\n  \u003cp\u003e\n    \u003c%= form.submit %\u003e\n  \u003c/p\u003e\n\u003c% end %\u003e\n```\n`article/` is absolute path of views, \nif your page on same folder of your component, \nwe can call name as well instead of write absolute path.\n\n### Partials Page\nRails can create partial page when you need it more that one times,\ncreate page and name it with `_` prefix and call it using render : \n```erbruby\n\u003c%= render \"article/form\", article: @article %\u003e\n```\n\n### *turbo-links*\nRails can create link with custom method and confirm, example \n```erbruby\n\u003c%= link_to 'Delete', article_path(@article), data: { turbo_method: :delete, turbo_confirm: 'Are you sure?' } %\u003e\n```\n\n### Concerns for Model / Controller\nConcerns are a way to make large controllers or models easier to understand and manage. This also has the advantage of reusability when multiple models (or controllers) share the same concerns. Concerns are implemented using modules that contain methods representing a well-defined slice of the functionality that a model or controller is responsible for. In other languages, modules are often known as mixins.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falbasyir%2Flearn-ruby-on-rails","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falbasyir%2Flearn-ruby-on-rails","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falbasyir%2Flearn-ruby-on-rails/lists"}