1
0
mirror of https://github.com/danbee/danbarberphoto synced 2025-03-04 08:49:07 +00:00
danbarberphoto/app/controllers/views_controller.rb
2018-02-16 11:10:13 -05:00

13 lines
215 B
Ruby

class ViewsController < ApplicationController
def create
photo = Photo.find_by_id(params[:photo_id])
if photo.present?
photo.log_view
head :ok
else
head :not_found
end
end
end