This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
session_plan: | |
id: int | |
level_id: int | |
phase_number: int | |
phase: string | |
position: int | |
session_plan_exercises: | |
[ | |
{ | |
id: int |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
How about this as a format for session_plan (written in Pseudo-JSON) | |
session_plan: | |
session_plan_exercises: | |
[ | |
{ | |
number_in_set: int | |
position: int | |
station: Station (if locked to one) | |
exercise: Exercise (no adjustments) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"level": { | |
"number": 1, | |
"workout_id": "TODO", | |
"session_plans": [ | |
{ | |
"phase": { | |
"table": { | |
"number": 1, | |
"key": "STABILITY" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
level: { | |
workout_id: 42, | |
number: 2, | |
session_plans: [ | |
{ | |
phase: 'strength', | |
position: 1 | |
exercises: { | |
[ | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source :rubygems | |
# We are not loading Active Record, nor Active Resources etc. | |
# We can do this in any app by simply replacing the rails gem | |
# by the parts we want to use. | |
gem "actionpack", "~> 3.2" | |
gem "railties", "~> 3.2" | |
gem "tzinfo" | |
# Let's use thin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading development environment (Rails 3.0.7) | |
irb: warn: can't alias exit from irb_exit. | |
ruby-1.9.2-p180 :001 > inst = ImageUploader.new | |
=> | |
ruby-1.9.2-p180 :002 > inst.recreate_versions! | |
NoMethodError: undefined method `read' for nil:NilClass | |
from /Users/houen/.rvm/gems/ruby-1.9.2-p180/gems/activesupport-3.0.7/lib/active_support/whiny_nil.rb:48:in `method_missing' | |
from /Users/houen/.rvm/gems/ruby-1.9.2-p180/gems/carrierwave-0.5.5/lib/carrierwave/uploader/cache.rb:73:in `cache_stored_file!' | |
from /Users/houen/.rvm/gems/ruby-1.9.2-p180/gems/carrierwave-0.5.5/lib/carrierwave/uploader/versions.rb:174:in `recreate_versions!' | |
from (irb):2 |