I''m trying to tidy up my first rails app, and want to customize the action ''show'' (created by generating a scaffold). It''s a recipe database, and some of the fields are not required when submitting a new recipe, such as the "History" field. However, when I want to show that recipe, I don''t want the column name "History" to show if there is no variable for that particular recipe. How do I create this conditional element? James -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060807/900c840a/attachment.html
<% if item.history && item.history !='''' %> history : <%= item.history %> <% end % -- ______________ Heri R. http://sprinj.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060807/795c2f71/attachment.html
Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: PGP.sig Type: application/pgp-signature Size: 186 bytes Desc: This is a digitally signed message part Url : http://wrath.rubyonrails.org/pipermail/rails/attachments/20060818/b1b94dc4/PGP.bin