removed unknown authorization error for gallery frontend

This commit is contained in:
harrybomrah committed 2014-10-20 20:25:58 +08:00
1 parent c7bebc6e0a
commit 5f3d97d7c2
5 files changed
+30 -8

No files matched your search

@@ -125,7 +125,8 @@ class Admin::GalleriesController < OrbitAdminController
end
def imgs
@album = Album.find(params[:gallery_id])
@album = Album.find(params[:id])
debugger
@tag_names = Array.new
@images = @album.album_images.all
@output = Array.new
+17
View File
@@ -65,6 +65,22 @@ class GalleriesController < ApplicationController
}
end
def imgs(album_id)
album = Album.find(album_id)
tag_names = Array.new
images = album.album_images.all
output = Array.new
images.each do |values|
output << { _id: values.id.to_s,
description: values.description,
title: values.title,
file: values.file.as_json[:file],
gallery_album_id: values.album_id,
tags: values.tags}
end
return output
end
def theater
params = OrbitHelper.params
image = AlbumImage.find(params[:uid])
@@ -75,6 +91,7 @@ class GalleriesController < ApplicationController
"album" => album,
"images" => images,
"image" => image,
"wall_images" => imgs(albumid),
"back_to_albums" => OrbitHelper.url_to_show(album.to_param)
}
end