Re: Re: display optional db data

Hassan Schroeder
2010-04-15T18:17:20Z

On Thu, Apr 15, 2010 at 11:05 AM, dan
<mr.dan.marks-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:
> could someone perhaps advise on how to move some of this logic from
> view to model?
> like ''get_price_info'' and it returns the properly
formatted string or
> nothing?
> or should these tests be performed in the view?

I''m not sure what you''re looking for here; if you have a view
with e.g.
<%= @thing.foo %>
and this particular "foo" is nil, nothing will display, otherwise you
get
the value of "foo".

If that''s not the behavior you want, please describe in more detail.

--
Hassan Schroeder ------------------------
hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
twitter: @hassan