Code Monkey home page Code Monkey logo

puddlr's Introduction

puddlr's People

Contributors

franco84 avatar joll59 avatar joesasson avatar

Watchers

James Cloos avatar  avatar

puddlr's Issues

Styling Needed.

Styling

  • * Dashboard
  • * Profile
  • * Puddle.
  • * Car index needs button styled for add car. [ materialize btn-wave]
  • * for text on all pages that displays to user.
  • * flash meesages [materialize TOAST]

Logic

Logic - non styling issues.

  • Profile Model add:
  • city
  • state
  • zip
  • Profile view add:
  • delete user option(Which deletes the user profile.)
  • Location Model add:
  • city
  • state
  • zip
  • PuddlePassenger add:
  • travel distance
  • travel time
  • Puddle model add:
  • destination; necessary for when the driver creates puddle! (Limited to either driver home address or company location?), Destination Selector on view page!
  • Puddle view edit:
  • Logic to display puddle by company/ location on puddle index
  • Display individual passenger travel distance, travel time and duration_in_traffic.
  • Analytics page to include:
  • Driver distance average per puddle ride
  • Passenger with the highest amount of traffic time
  • Longest traveling puddle for each day!

Feedback

What is the relevance of your most_puddles_count method? Do you need a whole method for this? most_puddles_count

Can refactor your driver_info method. driver_info

def driver_info
  [driver_name, driver_address, driver_phone]
end

Very well done on all of the validations! These are very cleanly written and cover numerous user use cases.

You don't need to repeat your before_action :authorize_user in each controller because you are already calling it in the ApplicationController. Just like you did in the SessionsController use the skip_before_action :authorize_user, only: [:new, :create] to not have that method run in certain controllers.

You're repeating a lot of .find() calls in your controllers. These can all be moved to a private method that is defined once, but called numerous times. For example in your CarsController you call @car = Car.find(params[:id]) a few times. Instead:

class CarsController < ApplicationController
  before_action :set_car, only: [:action1, :action2]

  ...

  private

  def set_car
    @car = Car.find(params[:id])
  end
end

Try to stick with RESTful routing and the proper CRUD actions! DriversController. This Uuuuugly - This should be an update action with the proper URL routing to go along with it i.e. patch '/drivers/:id', to: 'drivers#update', as: 'driver_remove_passenger' OR handle this update in your puddles#update action with the logic moved to your model.

Love all of the partials. These are incredibly useful and make life easier for a programmer trying to read your code.

Be sure you focus on proper RESTful routing and CRUD actions. If you think you need a new action for your app 9/10 times that will not be the case and that logic can be put into a proper CRUD action. Overall this turned out great! You should all be very proud of the hard work you put in. @Franco83-2 @joesass @Joll59

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.