I want to re-use a form partial for both edit and create views on an object...what is the best way to allow the form to be populated if data exists.
I currently am doing like this for every input field: <textarea name="message" id="message" cols="10" rows="30"><% $message ? $message : '' %></textarea> -- Anthony Ettinger 408-656-2473 http://anthony.ettinger.name @pets = Pets.find_all_by_species('dog') @pets.each do |dog| { if dog.name == 'Farley' dog.nick = 'Sir Barks-A-lot' elsif dog.name == 'Bonita' dog.nick = 'Princess Boo' else dog.nick = 'Doggie?' end } ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Mason-users mailing list Mason-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mason-users