How do I convert the following to a clear one-liner in ruby?
def questions
results = []
sections.each do |section|
results = results.concat(Question.find_all_by_survey_section_id(section.id))
end
results
end
I feel like I could use the &:
(Symbol#to_proc
) and returning
methods in there somehow.