yakryder / muscle-wizards

Contest prep app
0 stars 1 forks source link

Use the proxy #69

Closed dummied closed 8 years ago

dummied commented 8 years ago

Rather than setting the prep (this is most-common case I've seen) after instantiating an object, use the prep proxy instead.

As in:

https://github.com/SherSpock/muscle-wizards/blob/master/app/controllers/target_cardios_controller.rb#L15-L16

@target_cardio = @prep.target_cardios.new(target_cardio_params)

There are more than this one example.

dummied commented 8 years ago

https://github.com/SherSpock/muscle-wizards/blob/master/app/controllers/certifications_controller.rb#L9-L10

current_user.certifications.new ...

sbaughman commented 8 years ago

fixed with debug branch