Is there a pattern to refactor such a construct into a readable single line?
def show_section
@news = News.all_active
@news = @news.where(:section => params[:section]) unless params[:section] == "all"
@news = @news.all
end
I use Rails 3 and Ruby 1.9.2