text datatype in ror

Hi

     Can anybody help me to check whether a text field is nil in ror.
I have to check
params[:service_desk_attachment1][:attachment] is nil .But how.The
attachment is a field in the postgres table.There after migration it is
read as character varying

Sijo

Sijo Kg wrote:

Hi

     Can anybody help me to check whether a text field is nil in ror.
I have to check
params[:service_desk_attachment1][:attachment] is nil .But how.The
attachment is a field in the postgres table.There after migration it is
read as character varying

Sijo

you can add before_filter to your controller and check
params[:service_desk_attachment1][:attachment].blank?

Thanks It worked