{"id":19725329,"url":"https://github.com/bodacious/orthodox","last_synced_at":"2026-05-15T14:31:16.039Z","repository":{"id":42171238,"uuid":"96536422","full_name":"Bodacious/orthodox","owner":"Bodacious","description":"Rails generators for my own projects","archived":false,"fork":false,"pushed_at":"2023-03-09T01:35:00.000Z","size":252,"stargazers_count":0,"open_issues_count":5,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-11-24T19:44:17.457Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Bodacious.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2017-07-07T12:28:43.000Z","updated_at":"2021-10-17T18:35:25.000Z","dependencies_parsed_at":"2024-11-11T23:30:40.290Z","dependency_job_id":"ce159474-f4ab-4c4e-b787-2194937de4fb","html_url":"https://github.com/Bodacious/orthodox","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bodacious%2Forthodox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bodacious%2Forthodox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bodacious%2Forthodox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bodacious%2Forthodox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Bodacious","download_url":"https://codeload.github.com/Bodacious/orthodox/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241049320,"owners_count":19900426,"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-11T23:29:24.188Z","updated_at":"2026-05-15T14:31:16.000Z","avatar_url":"https://github.com/Bodacious.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Orthodox\n\nBetter Rails generators for modern apps\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'orthodox', github: \"bodacious/orthodox\"\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install orthodox\n\n## Usage\n\n### A Coffeescript file:\n\n    rails g coffeescript users\n\nCreates\n\n    window.users = do -\u003e\n\n      init = -\u003e\n\n      return { init }\n\n### A Coffeescript file with functions:\n\n    rails g coffeescript users show_all\n\nCreates\n\n    window.users = do -\u003e\n\n      init = -\u003e\n\n      showAll = -\u003e\n\n      return { init }\n\n### A Sass file:\n\n    rails g sass users\n\nCreates\n\n    .user\n      // Define sass here\n\n### A Sass file with BEM elements:\n\n    rails g sass users name avatar\n\nCreates\n\n    .user\n      // Define sass here\n\n    .user-name\n      // Define sass here\n\n    .user-avatar\n      // Define sass here\n\n### An empty controller:\n\n    rails g controller users\n\nCreates:\n\n    class Users \u003c ApplicationController\n\n    end\n\n\n### A controller with prepopulated actions:\n\n    rails g controller users new create show\n\nCreates:\n\n    class Users \u003c ApplicationController\n\n      def new\n        @user = users_scope.new\n      end\n\n      def create\n        @user = users_scope.new(user_params)\n        if @user.save\n          redirect_to(user_url(@user), notice: \"Successfully created user\")\n        else\n          render :new\n        end\n      end\n\n      def show\n        @user = users_scope.find(params[:id])\n      end\n\n\n      private\n\n\n      def users_scope\n        User.all\n      end\n\n      def user_params\n        params.require(:user).permit()\n      end\n\n    end\n\n### A controller with actions and authentication:\n\n    rails g controller users new create show --authenticate admin\n\nCreates:\n\n    class Users \u003c ApplicationController\n\n      before_action :authenticate_admin!\n\n\n      def new\n        @user = users_scope.new\n      end\n\n      def create\n        @user = users_scope.new(user_params)\n        if @user.save\n          redirect_to(user_url(@user), notice: \"Successfully created user\")\n        else\n          render :new\n        end\n      end\n\n      def show\n        @user = users_scope.find(params[:id])\n      end\n\n\n\n\n      private\n\n\n      def users_scope\n        User.all\n      end\n\n      def user_params\n        params.require(:user).permit()\n      end\n\n    end\n\n### A controller with a namespace:\n\n    rails g controller admins/users new create show --authenticate admin\n\nCreates:\n\n    class Admins::Users \u003c Admins::BaseControler\n\n      before_action :authenticate_admin!\n\n\n      def new\n        @user = users_scope.new\n      end\n\n      def create\n        @user = users_scope.new(user_params)\n        if @user.save\n          redirect_to(user_url(@user), notice: \"Successfully created user\")\n        else\n          render :new\n        end\n      end\n\n      def show\n        @user = users_scope.find(params[:id])\n      end\n\n\n      private\n\n\n      def users_scope\n        User.all\n      end\n\n      def user_params\n        params.require(:user).permit()\n      end\n\n    end\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/bodacious/orthodox.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbodacious%2Forthodox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbodacious%2Forthodox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbodacious%2Forthodox/lists"}