Rails: find_by, conserving leading whitespaces
- by peppermonkey
Hi,
when I do the following
def somefunction
@texts = A.find_all_by_someid(someid)
respond_to do |format|
format.xml { render :xml => @texts }
end
end
it gets the string from the db correctly, except if the string has leading whitespaces, it seems they are trimmed.
Note: the whitespaces are there in the db correctly
What can I do to conserve those whitespaces?
Thanks