Skip to content

Instantly share code, notes, and snippets.

@gotjosh
Created July 31, 2012 20:05
Show Gist options
  • Save gotjosh/3220028 to your computer and use it in GitHub Desktop.
Save gotjosh/3220028 to your computer and use it in GitHub Desktop.
How can I avoid to create the array on the first line?
@videos = []
@publisher.sources.each { |s| @videos << s.videos.paginate(:per_page => params[:limit] ||= 10, :page => params[:page] ||= 1)}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment