Class: ImageController

Inherits:
ApplicationController show all
Defined in:
app/controllers/image_controller.rb

Constant Summary

Constants included from PaginationHelper

PaginationHelper::DEFAULT_OPTIONS, PaginationHelper::OPTIONS

Instance Method Summary collapse

Methods included from PaginationHelper

included, #paginate, validate_options!

Instance Method Details

#faceObject



4
5
6
7
8
9
10
# File 'app/controllers/image_controller.rb', line 4

def face
  face = Face.find_first(["user_id = ?", @params['id']])
  render_text("", 404) and return unless face
  @headers['Content-type'] = face.content_type
  @headers['Last-Modified'] = face.updated_at
  render_text face.picture
end