[Rails] .empty? Method

Michael Boutros me at michaelboutros.com
Sun Feb 12 01:31:57 GMT 2006


I am using:

    if @post.empty?
       render_text "Post does not exist."
    end

But it gives me this error:

NoMethodError in Posts#view

undefined method `empty?' for #<Posts:0x39598d0>

However, if the method list empty? apears and stuff so I am confused.

-- 
Posted via http://www.ruby-forum.com/.


More information about the Rails mailing list