Skip to content

Instantly share code, notes, and snippets.

View surendra0507's full-sized avatar

Surendra surendra0507

View GitHub Profile
@surendra0507
surendra0507 / blog-requirements.md
Last active April 18, 2019 12:31
Blog development
  • Your client, a writer wants to start a blog. He wants to blog his article and open it for commenting by anyone viewinthe articles.The application should also have the ability to let the viewers to reply to a comment and further viewers can reply to that reply.This replying can be done for any of the replies and hence there is a hierarchy of replies and comments that is to be maintained.
  • Also all of the comment data should not loaded at once.Only the top 5 comments should be shown and when load more is clicked the next set should be displayed. The same should be done for the replies and the replies to those replies.

Description

  • Post an article
  • Comment on the article
  • Reply to the comment
  • Reply to the reply
  • Replying can be done to any comment or reply.
  • Load more for comments as well as at any of the levels of replies
@surendra0507
surendra0507 / requirements.md
Last active March 4, 2019 17:30
Ruby on Rails Flight booking web application assignment

Flight booking web application

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.

Description

  • Admins can create airplanes with different seat configurations(Airbus A380, Boeing 747).
  • Each airplane should have its own seat configuration. A sample seat configuration is given below-
Seat configuration
Category Seats in a row No.of rows
First Class 3 10
@surendra0507
surendra0507 / newsfeed_question.rb
Created January 7, 2019 11:20
RoR assignment test - 01
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
@surendra0507
surendra0507 / popular_rails_gems
Last active October 4, 2018 06:03
Popular gems which we used to have in Rails applications

Keybase proof

I hereby claim:

  • I am surendra-wal on github.
  • I am surendra (https://keybase.io/surendra) on keybase.
  • I have a public key ASBHUO3WLTeo_n-dcim_k6UYOTFnzL9oJGfZI9UXB1sXpwo

To claim this, I am signing this object:

@surendra0507
surendra0507 / spree_codesnippet.md
Last active May 3, 2017 13:10
Spree code snippet

##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)