class Api::Restaurant::ZonesController < Api::ApiController

  def index
      if (params[:filter] && params[:filter] = "all" )
        @all_tables = Table.active
        @all_rooms = Room.active
      else
        @zones = Zone.includes([:tables, :rooms]).where("is_active = true")
      end
  end

  private
  def zones_params
    params.permit(:filter)
  end
end
