Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
This paste will be private.
query = Work.query query.join(:editions) query.join(:authors) query.or.name_like(params[:title]).editions.name_like(params[:title]) query.or.authors.first_name_like(params[:author]).authors.last_name_like(params[:author]) query.editions.ean_like(params[:ean]) @editions = query.find.collect(&:editions).flatten
From the Design Piracy series on my blog: