When uploading images directly from /refinery/images/new redirect back t... #1904

merged 1 commit into from Aug 29, 2012


None yet
2 participants

ugisozols commented Aug 27, 2012

...o /refinery/images.

I changed the code because when I tried to upload images using direct path /refinery/images/new it would reload the same window and not redirect back to /refinery/images.

I wasn't sure about introducing refinery url helper in js so maybe we should approach this differently.

@parndt parndt commented on the diff Aug 27, 2012

@@ -55,12 +55,10 @@ def create
unless params[:insert]
if @images.all?(&:valid?)
flash.notice = t('uploaded_successfully', :scope => 'refinery.admin.images.form')
- if from_dialog?
- @dialog_successful = true
- render :nothing => true, :layout => true
- else
- redirect_to refinery.admin_images_path
- end
+ @dialog_successful = true if from_dialog?
+ render :nothing => true, :layout => true

parndt Aug 27, 2012


what if they're not using a dialogue?


ugisozols Aug 28, 2012


That's the case I was trying to fix. They'll get redirected back to /refinery/images by https://github.com/resolve/refinerycms/pull/1904/files#L0R54

parndt merged commit f8061d9 into master Aug 29, 2012

1 check failed

default The Travis build failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment