un comment puma

This commit is contained in:
Myat Zin Wai Maw
2019-05-16 12:09:48 +06:30
parent 66a6e5500c
commit eb4309355d
4 changed files with 33 additions and 13 deletions

View File

@@ -17,7 +17,7 @@ class Crm::CustomersController < BaseCrmController
@crm_customers = Customer.all
else
@crm_customers = Customer.search(filter)
paymal_customer = Customer.search_paypar_account_no(filter)
# paymal_customer = Customer.search_paypar_account_no(filter)
# search account no from paypar
if type == "card"

View File

@@ -55,7 +55,26 @@ class Settings::MenuItemAttributesController < ApplicationController
# DELETE /settings/menu_item_attributes/1
# DELETE /settings/menu_item_attributes/1.json
def destroy
@settings_menu_item_attribute.destroy
item_attribute_id =@settings_menu_item_attribute.id
item_attribute_id_string=""+item_attribute_id.to_s+""
if @settings_menu_item_attribute.destroy
menu_items =MenuItem.all
menu_items.each do |item|
if item.item_attributes.include?(item_attribute_id)
item_update =item.item_attributes.reject { |i| i == item_attribute_id }
item.item_code =item.item_code
item.item_attributes =item_update
item.save
end
if item.item_attributes.include?(item_attribute_id_string)
item_update =item.item_attributes.reject { |i| i == item_attribute_id_string }
item.item_code =item.item_code
item.item_attributes =item_update
item.save
end
end
end
# @settings_menu_item_attribute.destroy
flash[:notice] = 'Menu item attribute was successfully destroyed.'
render :json => {:status=> "Success", :url => settings_menu_item_attributes_path }.to_json
# respond_to do |format|

View File

@@ -178,7 +178,8 @@ class SalePayment < ApplicationRecord
def self.redeem(paypar_url,token,membership_id,received_amount,sale_id)
# membership_actions_data = MembershipAction.find_by_membership_type("redeem");
membership_actions_data = PaymentMethodSetting.find_by_payment_method("Redeem")
puts "This is membership_actions_data"
puts membership_actions_data.to_json
if !membership_actions_data.nil?
url = paypar_url.to_s + membership_actions_data.gateway_url.to_s

View File

@@ -1,10 +1,10 @@
# application_path="#{File.expand_path("../..", __FILE__)}"
# directory application_path
# #environment ENV.fetch("RAILS_ENV") { "production" }
# environment "production"
# pidfile "#{application_path}/tmp/puma/pid"
# state_path "#{application_path}/tmp/puma/state"
# stdout_redirect "#{application_path}/log/puma.stdout.log", "#{application_path}/log/puma.stderr.log"
# port ENV.fetch("PORT") { 62158 }
# workers 2
# preload_app!
application_path="#{File.expand_path("../..", __FILE__)}"
directory application_path
#environment ENV.fetch("RAILS_ENV") { "production" }
environment "production"
pidfile "#{application_path}/tmp/puma/pid"
state_path "#{application_path}/tmp/puma/state"
stdout_redirect "#{application_path}/log/puma.stdout.log", "#{application_path}/log/puma.stderr.log"
port ENV.fetch("PORT") { 62158 }
workers 2
preload_app!