update menu import/export ui

This commit is contained in:
Aung Myo
2018-03-21 10:30:28 +06:30
parent f51d193d47
commit 9db3ec07cc
4 changed files with 20 additions and 11 deletions

View File

@@ -72,8 +72,11 @@ class Settings::MenusController < ApplicationController
end
def import
Menu.import(params[:file])
redirect_to settings_menus_path, notice: "imported"
if params[:file]
Menu.import(params[:file])
redirect_to settings_menus_path, notice: "Menu was successfully Imported"
end
end
private