if params[:body] is empty, read some file instead.
is there a better way?
default_source_file = '/tmp/file'
body = if params[:body].blank?
IO.read(default_source_file)
else
params[:body]
end
I would use
present?method to check the presence as I find the code reads better..