app/controllers/admin/photos_controller.rb in fullstack-cms-0.3.8 vs app/controllers/admin/photos_controller.rb in fullstack-cms-0.3.9

- old
+ new

@@ -27,9 +27,18 @@ end def edit end + def rotate + @photo ||= Photo.find(params[:id]) + rotation = params[:deg].to_f + rotation ||= 90 + @photo.rotate!(rotation) +# flash[:notice] = "The image has been rotated" + end + + def update @photo.attributes = params[:photo] @photo.save if request.format == "json" render :json => {:success => true}