update query data for origami

This commit is contained in:
Aung Myo
2017-06-06 09:18:01 +06:30
36 changed files with 259 additions and 141 deletions

View File

@@ -4,7 +4,7 @@ class Crm::CustomersController < ApplicationController
# GET /crm/customers
# GET /crm/customers.json
def index
@crm_customers = Crm::Customer.all
@crm_customers = Customer.all
end
# GET /crm/customers/1
@@ -14,7 +14,7 @@ class Crm::CustomersController < ApplicationController
# GET /crm/customers/new
def new
@crm_customer = Crm::Customer.new
@crm_customer = Customer.new
end
# GET /crm/customers/1/edit
@@ -24,7 +24,7 @@ class Crm::CustomersController < ApplicationController
# POST /crm/customers
# POST /crm/customers.json
def create
@crm_customer = Crm::Customer.new(crm_customer_params)
@crm_customer = Customer.new(crm_customer_params)
respond_to do |format|
if @crm_customer.save
@@ -64,7 +64,7 @@ class Crm::CustomersController < ApplicationController
private
# Use callbacks to share common setup or constraints between actions.
def set_crm_customer
@crm_customer = Crm::Customer.find(params[:id])
@crm_customer = Customer.find(params[:id])
end
# Never trust parameters from the scary internet, only allow the white list through.