##Service to download a file from S3## ##Service to save a file to S3##
module Spree
class AttachmentService
attr_reader :content, :user
attr_writer :success
def initialize(content, key, user)
##Service to download a file from S3## ##Service to save a file to S3##
module Spree
class AttachmentService
attr_reader :content, :user
attr_writer :success
def initialize(content, key, user)
I hereby claim:
To claim this, I am signing this object:
Devise | |
- Flexible authentication solution for Rails (https://github.com/plataformatec/devise) | |
Pundit | |
- Leverage object oriented design patterns to build a simple, robust and scaleable authorization system (https://github.com/varvet/pundit) | |
Trailblazer | |
- A High-Level Architecture to uncouple your business logic from rails (https://github.com/trailblazer/trailblazer) | |
Carrierwave |
class User < ApplicationRecord | |
has_many :posts | |
has_many :comments | |
# id :integer not null, primary key | |
# name :string(50) default("") | |
end | |
class Post < ApplicationRecord | |
belongs_to :user | |
has_many :comments |
Your client, an airline company, is looking to build an application that can facilitate the bookings of their flights. This application should be able to manage all of their flight bookings and in-flight seat allocations. Admins of this platform should be able to create flights from different origins and destinations with different seat combinations. Users (passengers) should be able to select their seats on the chosen flight upon entering a PNR number, similar to airport kiosks around the country.
Category | Seats in a row | No.of rows |
---|---|---|
First Class | 3 | 10 |
Description
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
Automate API documentation with specs and CI/CD pipeline | |
API documentation is very important to any application. This helps Mobile, Frontend developers and other API consumers for easy integration. | |
There are a couple of ways to maintain the documentation | |
Maintain separate repo to manage API documentation. So that they don’t commit every change of API docs into the codebase. | |
Use the same repo having docs or some other folder to manually update when there is a change in the APIs | |
It is very difficult to manually maintain the API documentation for every change. How can we automate this? |
-- | |
-- Read only | |
-- | |
-- Create a group | |
CREATE ROLE cents_rd_group; | |
-- Grant access to existing tables | |
GRANT USAGE ON SCHEMA public TO cents_rd_group; | |
GRANT SELECT ON ALL TABLES IN SCHEMA public TO cents_rd_group; |