fix from rebase
Conflicts: app/views/layouts/_admin_sidebar.html.haml
This commit is contained in:
parent
f7ef401be7
commit
f5081813d9
6 changed files with 29 additions and 53 deletions
|
|
@ -190,7 +190,6 @@ module Admin
|
|||
|
||||
def edit
|
||||
@conferences = Conference.all
|
||||
@conference = Conference.find_by(short_title: params[:id])
|
||||
@date_string = date_string(@conference.start_date, @conference.end_date)
|
||||
respond_to do |format|
|
||||
format.html
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
module Admin
|
||||
class PhotosController < ApplicationController
|
||||
before_action :set_conference
|
||||
before_action :set_photo, only: [:edit, :update, :destroy]
|
||||
load_and_authorize_resource :conference, find_by: :short_title
|
||||
load_and_authorize_resource through: :conference
|
||||
|
||||
# GET /admin/photos
|
||||
def index
|
||||
|
|
@ -45,17 +45,6 @@ module Admin
|
|||
end
|
||||
|
||||
private
|
||||
|
||||
# Use callbacks to share common setup or constraints between actions.
|
||||
def set_conference
|
||||
@conference = Conference.find_by(short_title: params[:conference_id])
|
||||
end
|
||||
|
||||
# Use callbacks to share common setup or constraints between actions.
|
||||
def set_photo
|
||||
@photo = Photo.find_by(id: params[:id])
|
||||
end
|
||||
|
||||
# Only allow a trusted parameter "white list" through.
|
||||
def photo_params
|
||||
params[:photo]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue