Skip to content

Instantly share code, notes, and snippets.

@cs3b
Last active June 5, 2017 03:59
Show Gist options
  • Save cs3b/316b59aa08861a8c5b70e45abfd589a4 to your computer and use it in GitHub Desktop.
Save cs3b/316b59aa08861a8c5b70e45abfd589a4 to your computer and use it in GitHub Desktop.

Intro

https://speakerdeck.com/morizyun/four-reasons-to-learn-ruby-on-rails-in-your-first-web-programing

start here if you don't have any expierience with

if you have some expierence with rails start here

ensure you have ruby on rails 5.0 installed

http://guides.rubyonrails.org/getting_started.html

Example Tutorials

Lottery Platform

  • roles should be defined by rolify
  • to capture emails in development use latter_opener_web
  • for authentication use devise

Client Part

  • on main page see all the items avaialble to bid
    • can search item by name ransack
    • 6 items per page kaminari
  • item datails page should display
    • basic info about item
    • all the bidders
  • logged user can
    • bid any item
    • see items that he/she win/loose/is bidding
    • edit profile (including avatar upload)

Administrate Part

  • can create items (each item have name, uploaded picture) carrierwave
    • item can be edited
    • item can be deleted (only if there is no bidder)
  • can run draw
    • if at least two bidders are present
    • one person that win the draw should get email

Refactoring

  • use rubocop to align code styles
  • move all the draw logic into service object
  • prepare good readme for your project
  • rewrite forms using simpleform
  • rewrite your controllers using decent_exposure
  • improve your views using draper (use decorate option from decent_exposure)
  • add nice urls names using friendly_id
  • prapare fake data seed.rb using ffaker
  • refactor service object using - https://github.com/Selleo/business_process
  • refactor views using slim -> http://slim-lang.com/ slim-rails

Infrastructure

style your app

Web Sockets (pick one project)

Additional Resources

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment