Hey Everyone I''m caught up on some data output.
this is what i currently have:
<dl class="details">
<dt>Make:</dt><dd><%=h vehicle.make %></dd>
<dt>Model:</dt><dd><%=h vehicle.model %></dd>
<dt>Year:</dt><dd><%=h vehicle.year %></dd>
<dt>Mileage:</dt><dd><%=h vehicle.mileage
%></dd>
<% if vehicle.vehicle_options.drive.eql? "please_select" %>
<dt>Transmission:</dt><dd><%=h
vehicle.vehicle_options.transmission
%></dd>
<% end %>
<% if vehicle.exterior_color.eql? "not_specified" %>
<dt>Ext Color:</dt><dd><%=h vehicle.exterior_color
%></dd>
<% end %>
<% if vehicle.vehicle_options.drive.eql? "please_select" %>
<dt>Drivetrain:</dt><dd><%=h
vehicle.vehicle_options.drive %></dd>
<% end %>
<% if vehicle.vehicle_options.engine_size.eql? "" %>
<dt>Engine:</dt><dd><%=h
vehicle.vehicle_options.engine_size %></
dd>
<% end %>
<dt>Price:</dt><dd><%=h vehicle.price %></dd>
</dl>
I have some enumerated fields on creation and I don''t want to display
them in the event someone has decided not to fill them out (ie leaving
them as the default). The above does not work sadly. How can I
appropriatly check for this. I also have some boolean values as well
as possible nils(Or blank space). How can I check for these and if
theres content display it. Otherwise skip that whole field ?
I figure it should be pretty easy but everything I try fails.
Thanks, Happy Holidays !
brianp
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.