Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def picture
- @user = User.find(params[:id])
- if !(@user.picture.nil? or @user.picture.empty?)
- send_data(@user.picture, :filename => "photo.gif", :type => "image/gif", :disposition => "inline")
- else
- send_file(File.dirname(__FILE__) + "/../../public/images/participant_silhouette.gif", :filename => 'photo.gif', :type => 'image/gif', :disposition => 'inline')
- end
- end
Add Comment
Please, Sign In to add comment