Open jpslav opened 12 years ago
Let me try this then I like small things XD
OK, see lib/asset_methods.rb as an example (and looking in the code for "AssetMethods"). Ditto for lib/content_parse_and_cache.rb
The idea is to put code that is repeated into one file that is included in the various places it is used.
On Jun 1, 2012, at 9:33 AM, zapcannon99 wrote:
Let me try this then I like small things XD
Reply to this email directly or view it on GitHub: https://github.com/lml/quadbase/issues/77#issuecomment-6061747
So I looked up things, and I think the current code already does what you want
attr_accessor_with_default is deprecated in Rails 3.2, so that's probably why I think wither we stick with the same or go with a module of course, your call
Of course, github doesn't update realtime, so I didn't get the hint you wanted a module until just now
I'm assuming that you want the module in quadbase/lib right?
Yes
On Jun 1, 2012, at 10:12 AM, zapcannon99 wrote:
I'm assuming that you want the module in quadbase/lib right?
Reply to this email directly or view it on GitHub: https://github.com/lml/quadbase/issues/77#issuecomment-6062732
Require that file in config/environment.rb
Rachel has done this if you need help
On Jun 1, 2012, at 1:26 PM, zapcannon99reply@reply.github.com wrote:
is there something special about including a module I run tests, and it keeps telling me that VariatedContentHTML has not been initialized (it's my module)
Reply to this email directly or view it on GitHub: https://github.com/lml/quadbase/issues/77#issuecomment-6067154
oh okay thanks
I forgot to ask From what I am seeing, these things are supposed to randomize some portion of a question right?
Yes this is part of question randomization, but for the most part I don't think you'll have to worry about that to implement this issue. You should just see the same code in a couple of places, it should go into a module that is included from those places.
On Jun 1, 2012, at 2:44 PM, zapcannon99 wrote:
I forgot to ask From what I am seeing, these things are supposed to randomize some portion of a question right?
Reply to this email directly or view it on GitHub: https://github.com/lml/quadbase/issues/77#issuecomment-6069187
so for some reason, the module doesn't work for me however, just making a attr_accessor with nothing after it seems to work fine I'll be trying to break this for a while
and I broke it
nvm JPS helps tons
Or better yet, create an attr_accessor with a default value option
Right now, code is copied across question_setup, answer_choice, question.