Commit b7af1eb

mo khan <mo@mokhan.ca>
2015-05-24 05:45:31
hound happy.
1 parent 62fcf63
Changed files (2)
app
config
deploy
app/models/training_session.rb
@@ -22,11 +22,11 @@ class TrainingSession < ActiveRecord::Base
         exercise_row = workout_row.exercises[index]
         sets = []
         1.upto(exercise_workout.sets).each do |n|
-          sets << (
-            exercise_row["set#{n}"].to_i > 0 ?
-            exercise_row["set#{n}"] :
-            0
-          )
+          if exercise_row["set#{n}"].to_i > 0
+            sets << exercise_row["set#{n}"]
+          else
+            sets << 0
+          end
         end
 
         session.exercise_sessions.create!(
config/deploy/local.rb
@@ -7,8 +7,6 @@
 # server 'example.com', user: 'deploy', roles: %w{app web}, other_property: :other_value
 # server 'db.example.com', user: 'deploy', roles: %w{db}
 
-
-
 # role-based syntax
 # ==================
 
@@ -21,8 +19,6 @@
 # role :web, %w{user1@primary.com user2@additional.com}, other_property: :other_value
 # role :db,  %w{deploy@example.com}
 
-
-
 # Configuration
 # =============
 # You can set any configuration variable like in config/deploy.rb
@@ -31,8 +27,6 @@
 # http://capistranorb.com/documentation/getting-started/configuration/
 # Feel free to add new variables to customise your setup.
 
-
-
 # Custom SSH Options
 # ==================
 # You may pass any option but keep in mind that net/ssh understands a