Coder Social home page Coder Social logo

study-coders-school-zen-restaurant's People

Contributors

hnanhquoc avatar

Watchers

 avatar  avatar

study-coders-school-zen-restaurant's Issues

Thanks!

Hi @hnanhquoc, congrats on your first homework submission!

Goals of this homework:

Nice things we see:

  • Good use of nested resources in config/routes.rb
  • Clean application.html.erb layout file with a good use of partials.
  • Use bootstrap class names appropriately, should try to add styling in css files instead of inline styling.
  • Use validations in models
  • Use of belongs_to/has_many relationships
  • Good try on using modal to display food item detail

Some suggestions for ya:

  1. Consider seeding food items :)
  2. On food_items/1/orders/new page, consider displaying information about the food item. You can create a food_item partial so that it can be re-used on the menu page and here.
  3. In HomeController#menu, you can extract the order logic into FoodItem model. That way you can easily test in a rails console and keep your controller logic simple.
  4. In OrdersController#create, instead of assign attribute one by one, you can try this to see if it work and shorten your code:
    @object.attributes = order_params

Good work when focus on making pretty UI. Hope this gives you some ideas to improve the code base. Try to work more on the optional stories next time, there are a lot of things to learn from. If you have any questions above the points above, don't hesitate to ask!

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.