Skip to content

Instantly share code, notes, and snippets.

@jamesgecko
Created March 16, 2012 21:42
Show Gist options
  • Save jamesgecko/2052910 to your computer and use it in GitHub Desktop.
Save jamesgecko/2052910 to your computer and use it in GitHub Desktop.
Searching 204 files for "@customer=" (regex)
0 matches across 0 files
Searching 204 files for "@customer ="
C:\Users\denton\code\billing\app\controllers\bills_controller.rb:
4 def new
5 @bill = Bill.new
6: @customer = Customer.find(params[:customer_id])
7
8 respond_to do |format|
.
22 # POST /bills.json
23 def create
24: @customer = Customer.find(params[:customer_id])
25 @bill = @customer.bills.build(params[:bill])
26
..
40 def update
41 @bill = Bill.find(params[:id])
42: @customer = Customer.find(@bill.customer_id)
43
44 respond_to do |format|
C:\Users\denton\code\billing\app\controllers\customers_controller.rb:
14 # GET /customers/1.json
15 def show
16: @customer = Customer.find(params[:id])
17 @phones = @customer.phones.find(:all)
18 @emails = @customer.emails.find(:all)
..
30 # GET /customers/new.json
31 def new
32: @customer = Customer.new
33
34 respond_to do |format|
..
40 # GET /customers/1/edit
41 def edit
42: @customer = Customer.find(params[:id])
43 end
44
..
46 # POST /customers.json
47 def create
48: @customer = Customer.new(params[:customer])
49
50 respond_to do |format|
..
62 # PUT /customers/1.json
63 def update
64: @customer = Customer.find(params[:id])
65
66 respond_to do |format|
..
78 # DELETE /customers/1.json
79 def destroy
80: @customer = Customer.find(params[:id])
81 @customer.destroy
82
C:\Users\denton\code\billing\app\controllers\emails_controller.rb:
4 def new
5 @email = Email.new
6: @customer = Customer.find(params[:customer_id])
7
8 respond_to do |format|
.
15 # POST /emails.json
16 def create
17: @customer = Customer.find(params[:customer_id])
18 @email = @customer.emails.build(params[:email])
19
C:\Users\denton\code\billing\app\controllers\notes_controller.rb:
3 def show
4 @note = Note.find(params[:id])
5: #@customer = Customer.find(@note.customer_id) # This works commented out? Bwa?
6
7 respond_to do |format|
.
15 def new
16 @note = Note.new
17: @customer = Customer.find(params[:customer_id])
18
19 respond_to do |format|
..
26 def edit
27 @note = Note.find(params[:id])
28: @customer = Customer.find(@note.customer_id)
29 end
30
..
32 # POST /notes.json
33 def create
34: @customer = Customer.find(params[:customer_id])
35 @note = @customer.notes.build(params[:note])
36
..
50 def update
51 @note = Note.find(params[:id])
52: @customer = Customer.find(@note.customer_id)
53
54 respond_to do |format|
C:\Users\denton\code\billing\app\controllers\phones_controller.rb:
4 def new
5 @phone = Phone.new
6: @customer = Customer.find(params[:customer_id])
7
8 respond_to do |format|
.
15 # POST /phones.json
16 def create
17: @customer = Customer.find(params[:customer_id])
18 @phone = @customer.phones.build(params[:phone])
19
..
32 # DELETE /phones/1.json
33 def destroy
34: #@customer = Customer.find(params[:customer_id])
35 @phone = Phone.find(params[:id])
36 @phone.destroy
C:\Users\denton\code\billing\test\functional\customers_controller_test.rb:
3 class CustomersControllerTest < ActionController::TestCase
4 setup do
5: @customer = customers(:one)
6 end
7
20 matches across 6 files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment