Oder auch: @story = Story.find_by_id(params[:id]) || Story.first_story
(hat zudem den Vorteil, dass es bei URL-hacking mit fehlendem Record nicht knallt). Gruß! - Bernd > So was in der Art wie > > unless params[:id] > @story = Story.first_story # eigentliche Seite > else > @story = Story.find(params[:id] > end _______________________________________________ rubyonrails-ug mailing list [email protected] http://mailman.headflash.com/mailman/listinfo/rubyonrails-ug
