emenu api integrated

This commit is contained in:
Min Zeya Phyo
2017-04-19 18:37:07 +06:30
parent a717791a7c
commit c4e76c53b2
23 changed files with 158 additions and 55 deletions

View File

@@ -25,10 +25,11 @@ class Settings::TaxProfilesController < ApplicationController
# POST /settings/tax_profiles.json
def create
@settings_tax_profile = TaxProfile.new(settings_tax_profile_params)
@settings_tax_profile.created_by = current_login_employee.name
respond_to do |format|
if @settings_tax_profile.save
format.html { redirect_to @settings_tax_profile, notice: 'Tax profile was successfully created.' }
format.html { redirect_to settings_tax_profiles_path, notice: 'Tax profile was successfully created.' }
format.json { render :show, status: :created, location: @settings_tax_profile }
else
format.html { render :new }
@@ -42,7 +43,7 @@ class Settings::TaxProfilesController < ApplicationController
def update
respond_to do |format|
if @settings_tax_profile.update(settings_tax_profile_params)
format.html { redirect_to @settings_tax_profile, notice: 'Tax profile was successfully updated.' }
format.html { redirect_to settings_tax_profiles_path, notice: 'Tax profile was successfully updated.' }
format.json { render :show, status: :ok, location: @settings_tax_profile }
else
format.html { render :edit }