I have a question in my work,please help me!

Looks suspiciously like an instance of the pattern "do my thoughtworks
code review for me"

Almost word for word....


I manage it with another method ,but i is still wrong.The code is:

def exa_stops

  def find_route(s1,s2)
     for s in start_routes
       for e in end_routes
    if pair_group.length !=0
     for p in pair_group
        pair_group.delete(p) if p[2,1]=="A"
     return pair_group

  def route_with_onestop(s1,s2)

def exa_with_stops(s1,s2,esn,n)
if $exastops_array.include?(esn)
  $exastops_array.each{|e|@part_of_exastops_array<<e if e==esn}
  return @part_of_exastops_array.length
  for p in pair_group
   if p[1,1]==p[2,1]
   elsif Route.find_by_with_name(p[1,1]+p[2,1])

You may want to start over with some heavy BDD.

I do not know your means.Anyone can help me?

Keynan Pratt wrote:


You should be able to modify this pretty easily to get you the routes
from any given starting point to any given ending point at a set

Lets assume this is rails and not just ruby Were working with.


How about setting up a table of the stations and then a table of the routes that has a serialized field containing the ids of the stops along the way (something like stops_id)?

   Thank you Ryan Bigg and Keynan Pratt ,i have resolve my question.Maby
if i modify my database table ,i can do it .I will try it.I have managed
it in my method design in another way.Thank you!Good luck!

Ryan Bigg wrote: