Open PhuongXmaster opened 8 years ago
:+1: Great job!!! I really admire your efforts in whipping this assignment to shape. Every little detail counts! I love the care you've put in this submission :bow:
You have a lot of great stuff in this code base. I have many things to like:
I18n.t
Suggestions:
events_controller.rb
, it is actually common (and a decent choice) to set common variables via a before_action
. However, I encourage you to keep things simple when the syntax becomes to a little complex. For example, instead of before_action :set_event, only: [:show, :edit, :update, :destroy]
, it will be clearer if we just put @event = Event.find params[:id]
in each of the 4 actions above. See more here http://craftingruby.com/posts/2015/05/31/dont-use-before-action-to-load-data.htmlTicketsController#available_ticket
method in TicketType
model instead. That way, you can just use @ticket_type.available_ticket
without any arguments.cc @coderschoolreview @chug2k
/cc @coderschoolreview