Re: Using "if else" in a helper

Franz Strebel
2008-12-11T15:33:10Z

On Thu, Dec 11, 2008 at 4:22 PM, atmorell
<atmorell-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:
>
> Hello,
>
> I am trying to move some logic from my views into a helper.  If album
> with id 123 is found the view displays "found". If I replace 123
with
> something that does not exists the page is just blank... Why don''t
I
> get the "not found" message?
>
> Any ideas?

Fire up your console and see what happens when you try these:

Album.find(123)

Album.find_by_id(123)

--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---