OSDN Git Service
(root)
/
pettanr
/
pettanr.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
list browser created
[pettanr/pettanr.git]
/
app
/
controllers
/
panel_pictures_controller.rb
diff --git
a/app/controllers/panel_pictures_controller.rb
b/app/controllers/panel_pictures_controller.rb
index
94d3218
..
37594b7
100644
(file)
--- a/
app/controllers/panel_pictures_controller.rb
+++ b/
app/controllers/panel_pictures_controller.rb
@@
-1,5
+1,6
@@
class PanelPicturesController < ApplicationController
class PanelPicturesController < ApplicationController
- before_filter :authenticate_author!, :except => [:index]
+ before_filter :authenticate_author!, :only => [:index, :show]
+ before_filter :authenticate_admin!, :only => [:list, :browse]
# GET /panel_pictures
# GET /panel_pictures.json
# GET /panel_pictures
# GET /panel_pictures.json
@@
-12,4
+13,13
@@
class PanelPicturesController < ApplicationController
end
end
end
end
+ def list
+ @panel_pictures = PanelPicture.all
+
+ respond_to do |format|
+ format.html { render layout: 'system' }
+ format.json { render json: @panel_pictures }
+ end
+ end
+
end
end