summaryrefslogtreecommitdiff
path: root/app/controllers/admin
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2014-06-01 15:11:30 -0600
committermo khan <mo@mokhan.ca>2014-06-01 15:11:30 -0600
commit53838b971c8f88fee85e0d577c9f8f314d07fe91 (patch)
tree9772266d5f5eed477903ed917a61cdbfd6cadbda /app/controllers/admin
parent9de341f0b1a0707eebab5c4ea8b1e7a5ac6f06ce (diff)
display lat and long in photos admin section.
Diffstat (limited to 'app/controllers/admin')
-rw-r--r--app/controllers/admin/photos_controller.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/app/controllers/admin/photos_controller.rb b/app/controllers/admin/photos_controller.rb
index 46c489bb..6af6ac0f 100644
--- a/app/controllers/admin/photos_controller.rb
+++ b/app/controllers/admin/photos_controller.rb
@@ -1,11 +1,16 @@
module Admin
class PhotosController < AdminController
+ def initialize(photo_repository = Photo)
+ @photo_repository = photo_repository
+ super()
+ end
+
def index
- @photos = Photo.order(id: :desc)
+ @photos = @photo_repository.order(id: :desc)
end
def show
- @photo = Photo.find(params[:id])
+ @photo = @photo_repository.find(params[:id])
end
end
end