Skip to content

Instantly share code, notes, and snippets.

@chelseatroy
Last active September 20, 2018 17:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chelseatroy/2c5f18625463669c3e3173c16294f4a5 to your computer and use it in GitHub Desktop.
Save chelseatroy/2c5f18625463669c3e3173c16294f4a5 to your computer and use it in GitHub Desktop.
Example: Data Import as a Process
class WorkoutsController < ApplicationController
...
def index
@workouts = Workout.complete
end
def fix_incompletes
@workouts = Workout.needs_revision
end
def performance
workouts = Workout.complete
@overall_strength_chart = calculate_strength_changes(workouts)
@aerobic_capacity_chart = calculate_aerobic_capacity_changes(workouts)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment