Open thejourneydude opened 8 years ago
Yep, we've got the wrap_attributes
method that accomplishes that. https://github.com/openstax/tutor-server/blob/master/lib/wrapper.rb#L41-L53 It's used in: https://github.com/openstax/tutor-server/blob/master/app/subsystems/catalog/offering.rb#L8-L10
I'm guessing the code you spotted pre-dates the wrapper method or maybe it didn't work with it for some reason?
I was about to go look over at the Wrapper class. Thanks! Super new to the code so my apologizes.
Oh no worries at all! I wrote the wrapper but it looks like the instance I linked to is the only user of it :)
This would prob be a nice cleanup task for when you feel bored :)
Work on in sustain if no other bugs to fix.
Browsing through code and I spotted nearly duplicated methods inside some of the content module classes. Could meta programming be implemented in this case? Maybe that's overkill and/or be super low-priority. Just thought I would throw in my two cents.
Reference: https://github.com/openstax/tutor-server/blob/50b622fb63f7dc26567f868a2828b5c29d5a206d/app/subsystems/content/exercise.rb