Fetch all entries exept those with empty column in Rails
Posted
by Alfred Nerstu
on Stack Overflow
See other posts from Stack Overflow
or by Alfred Nerstu
Published on 2010-03-11T18:43:54Z
Indexed on
2010/03/11
19:24 UTC
Read the original article
Hit count: 403
How do I fetch all 'link' entries exept those with an 'url' column that is blank? My controller looks like this:
def show
@user = User.find_by_username(params[:username])
@links = @user.links.all
respond_to do |format|
format.html # show.html.erb
format.xml { render :xml => @links }
end
end
Thanks in advance!
© Stack Overflow or respective owner