{"id":19600705,"url":"https://github.com/softprodigyindia/ror-apis","last_synced_at":"2025-02-26T15:26:59.190Z","repository":{"id":48394444,"uuid":"280056213","full_name":"SoftprodigyIndia/ror-apis","owner":"SoftprodigyIndia","description":null,"archived":false,"fork":false,"pushed_at":"2021-07-28T09:32:03.000Z","size":5693,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-09T08:15:54.482Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/SoftprodigyIndia.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":"2020-07-16T04:49:31.000Z","updated_at":"2021-07-24T21:01:41.000Z","dependencies_parsed_at":"2022-08-19T10:31:51.260Z","dependency_job_id":null,"html_url":"https://github.com/SoftprodigyIndia/ror-apis","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SoftprodigyIndia%2Fror-apis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SoftprodigyIndia%2Fror-apis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SoftprodigyIndia%2Fror-apis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SoftprodigyIndia%2Fror-apis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SoftprodigyIndia","download_url":"https://codeload.github.com/SoftprodigyIndia/ror-apis/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240879082,"owners_count":19872294,"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-11T09:15:58.076Z","updated_at":"2025-02-26T15:26:59.170Z","avatar_url":"https://github.com/SoftprodigyIndia.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## README\n\nThis README would normally document whatever steps are necessary to get the\napplication up and running.\n\n\n* Installation\n\n  ### Clone this repo to your local machine using https://github.com/SoftprodigyIndia/ror-apis.git or download the zip file from https://github.com/SoftprodigyIndia/ror-apis/archive/master.zip\n\n* Setup\n\n  - Run the following commands on your terminal to setup this project\n    #### \"rvm use 2.7.0@ror-apis --create\" to create gemset.\n    #### \"bundle install\" to install all the packages.\n    #### \"rake db:create\" to create the database.\n    #### \"rake db:migrate\" to run all the migrations.\n    #### \"rake db:seed\" to prepopulate the data in your database.\n    #### \"bundle exec rails s\" to start your rails server.\n\n* Useful Links\n\n  #### Postman api collection: \"/public/Basic_api_collection.postman_collection.json\"\n  #### Also swagger test module in \"your_app_url/api\" (eg:- http://localhost:3000/api)\n  #### For demo\n    - website link:- \"https://rorapistaging.herokuapp.com/\"\n    - Admin url :- \"admin@admin.com\"\n    - Admin url :- \"admin@123\"\n  \n  \n* some useful gems\n## CanCanCan gem\n  CanCan is an authorization library for Ruby on Rails which restricts what resources a given user is allowed to access.\n  All permissions are defined in a single location (the Ability class) and not duplicated across controllers, views, and database queries.\n  \n-Setup\n  1. add gem \"gem 'cancancan'\" in gemfile and run bundle install.\n  2. run by \"rails g cancan:ability\" to create User permissions are defined in an Ability class.\n  3. Use \"load_and_authorize_resource\" method is provided to automatically authorize all actions in a RESTful style \n     resource controller. It will use a before filter to load the resource into an instance variable and authorize it for every action.\n  4. Handle Unauthorized Access: If the user authorization fails, a CanCan::AccessDenied exception will be raised. \n     You can catch this and modify its behavior in the ApplicationController.\n     class ApplicationController \u003c ActionController::Base\n        rescue_from CanCan::AccessDenied do |exception|\n           redirect_to root_url, :alert =\u003e exception.message\n        end\n     end\n  5. in our app abilities are define below: \n     \u003eabilities:  \n     1. Admin have an all access.\n     2. Staff have an ability to update.\n     3. Customer can manage their profile.\n  \n\n  ## Active Admin gem\n  Active Admin is a Ruby on Rails framework for creating elegant backends for website administration.\n \n-Setup\n  1. add gem \"gem 'activeadmin'\" in gemfile.\n  2. After updating your bundle, run the installer \"rails generate active_admin:install\"(The installer creates an \n     initializer used for configuring defaults used by Active Admin as well as a new folder at app/admin to put all \n     your admin configurations.)\n  Note: Uncomment this line \"require 'sprockets/railtie'\" in application.rb/config.\n  3. Migrate your db and start the server:\n    $\u003e rails db:seed\n    $\u003e rails db:migrate\n    $\u003e rails server\n  4. Visit http://localhost:3000/admin and log in using:\n     login: admin@example.com\n     password: password\n     \u003e You’re on your brand new Active Admin dashboard.\n  5. To register your first model, run:\n     $\u003e rails generate active_admin:resource ModelName(User)\n     \n### active admin module in \"your_app_url/api\" (eg:- http://localhost:3000/admin)\n    \n  - website link:- \"https://rorapistaging.herokuapp.com/admin\"\n  - Admin login :- \"admin@example.com\"\n  - Admin password :- \"password\"\n   \n  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoftprodigyindia%2Fror-apis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoftprodigyindia%2Fror-apis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoftprodigyindia%2Fror-apis/lists"}