app/controllers/spina/admin/photos_controller.rb in spina-0.8.3 vs app/controllers/spina/admin/photos_controller.rb in spina-0.9.0

- old
+ new

@@ -1,9 +1,9 @@ module Spina module Admin class PhotosController < AdminController - before_filter :set_breadcrumbs + before_action :set_breadcrumbs authorize_resource class: Photo layout "spina/admin/media_library" @@ -14,10 +14,12 @@ end def create @photo = Photo.create!(photo_params) respond_to do |format| - format.js + format.js do + render params[:media_library] ? :create : :create_and_select + end format.json do render json: { file_url: @photo.file_url } end end end