Ruby on Rails Monday, March 24, 2014

>
> Do not make us wade through lots of code trying to understand what is
> going on. Explain the problem and show us just a few lines of code if
> necessary. For instance of what type is play_list? You said it was
> an instance of a model, but it seems to be an array or collection of
> some sort.
>
> Colin

Sorry about that :-)

Play_list is an array of arrays returned at the beginning of the create
method. Each array contains a topic id. Array[0] needs to be converted
to a list of the question id's contained in that topic. That is all
taken care of.

The sequence of the question id's in array[0] needs to be manipulated,
in more than one method.

So... I need to either duplicate the code in several methods (in the
same controller) or create a method that is called by the controllers
multiple methods. The model method seems right but play_list does not
seem to be an instance as it is not yet created and is not yet an
attribute of the model

Dave

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/ca69eb49f6c7db489f494d077b3d442d%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment