search for: rushingoffense

Displaying 2 results from an estimated 2 matches for "rushingoffense".

2009 Jun 07
17
ActiveRecord Classes
...he outline of the files in use: ....app ........controllers ............application_controller.rb ............rushing_offenses_controller.rb ........models ............rushing_offense.rb ....lib ........scraper.rb ........tasks ............scraper.rake The rushing_offense.rb file contains: class RushingOffense < ActiveRecord::Base end The scraper.rb file contains: class Scraper < ActiveRecord::Base # METHOD that define which URL to parse # METHOD that parses the data into an instanced variable called @rows # METHOD that should be updating my database table called "rushing_offenses" # Up...
2009 Jul 17
19
I need help saving table data from a rake task
...e task. Here is my example using just two arrays (there are 14 in this particular rake task): update_tsos_offense = TsosOffense.new to_team_id, to_ppcs = update_tsos_offense.calculate_tsos(TotalOffense, "ydspgm", "desc") ro_team_id, ro_ppcs = update_tsos_offense.calculate_tsos(RushingOffense, "ydspg", "desc") This task starts with creating a new object (TsosOffense) which is the model that houses the table I will eventually write/save data to. It then calls a method from this new object and returns 2 results from the model method for each call. (e.g. to_team_id,...