search for: teamvar

Displaying 1 result from an estimated 1 matches for "teamvar".

2009 Jul 16
9
Please help me understand how arrays are translated in rails
...#39;'m just having trouble making headway into what is probably a very easy subject. I understand arrays with at least 4 other languages but with Ruby I haven''t found a mental connection with how I can assign variables to arrays.. Take for example: def calculate_tsos(model, datavar, teamvar, valvar) var = model.compiled_this_week.find(:all) var.each_with_index do |rows, i| puts "#{model} [ Row #{i} | Team ID = #{rows.team_id} | Team = #{rows.team.name} | #{datavar} = #{rows.__send__(datavar)}" end end This will give me: TotalOffense [ Row 0 | Team ID = 5 | Team...