Ruby on Rails Monday, March 24, 2014

On 24 March 2014 18:56, Dave Castellano <lists@ruby-forum.com> wrote:
> Hi,
>
> I have some code that has to be used by more than one method in the same
> class. Would I create a module for this or is there a better way?
> ...
> in method:
> now_playing = play_list.sequence_questions
> in model:
> include QuestionSequencer

Is play_list an instance of a model? If so then why is
sequence_questions not just a method of the model?

Colin

--
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/CAL%3D0gLtA2MJrEqzNSoYT8aAK2cc11tOm9H0-nE6y9u9f80bKYg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment