addresses 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 77c2ff9a523ed0fba0619f49cfc9c938af37848e
4
- data.tar.gz: ca9a90183130bcd4d0e69cd990a2f4780c8beb55
3
+ metadata.gz: 0d7154181ed373a82fcfcc78a21023d55397a105
4
+ data.tar.gz: d5632da7e1d99386b7e4fd3f9090d7eedde0e804
5
5
  SHA512:
6
- metadata.gz: e5c931b501c9e499278df51018dcab823c047f0ace0a087f28d5d02062b60ed0fd3215ee381b8ca8426bc0fd6d675b14ccaac1b2ccdb805185a943d29e15661f
7
- data.tar.gz: a166e297e212b0d73df40f821f7b4718a6698440aa65b3356785d23b20f55d1f1557fa3abcace3919f282f49c5e91bf40bcef6f2c0cc17977a64d7dc6942f259
6
+ metadata.gz: 16aa66c596f719e5360d18adea079556e2c840750ad21e72c89e47d92e5720105dfc214ac4ec6255236e0a5ba90ab59d270e61e91018ceb7a450df6fb8e446fe
7
+ data.tar.gz: 5f709bfa7cec85865116c6da142667cb9f21295dc1237d10c6e84eb5131f534656c8c9385215363d706c2ef223da13093f662a1541e7a94f691edf0bee9a8ffc
@@ -6,6 +6,8 @@ module Addresses
6
6
  validates :zipcode_id, :number, presence: true
7
7
  delegate :street, :neighborhood, :city, to: :zipcode
8
8
 
9
+ accepts_nested_attributes_for :zipcode, allow_destroy: false
10
+
9
11
  def to_s
10
12
  "#{self.street}, #{self.number}, #{self.neighborhood.name}. #{self.city.name} - #{self.city.state.acronym}"
11
13
  end
@@ -6,7 +6,7 @@ module Addresses
6
6
  belongs_to :neighborhood
7
7
  has_many :addresses
8
8
 
9
- validates :number, :city_id, :state_id, presence: true
9
+ validates :number, :city_id, :state_id, :street, presence: true
10
10
 
11
11
  after_find :set_state_id
12
12
  before_validation :set_state_id
@@ -315719,3 +315719,12 @@ rack (2.0.1) lib/rack/handler/webrick.rb:86:in `service'
315719
315719
  Rendering /Users/joice/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb
315720
315720
  Rendered /Users/joice/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (21.9ms)
315721
315721
  Rendered /Users/joice/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout (128.4ms)
315722
+ Started GET "/addresses/zipcodes/05012010.json" for ::1 at 2016-09-21 14:40:54 -0300
315723
+ Processing by Addresses::ZipcodesController#show as JSON
315724
+ Parameters: {"zipcode"=>"05012010"}
315725
+ Addresses::Zipcode Load (0.2ms) SELECT "addresses_zipcodes".* FROM "addresses_zipcodes" WHERE "addresses_zipcodes"."number" = ? LIMIT ? [["number", "05012010"], ["LIMIT", 1]]
315726
+ Addresses::City Load (0.1ms) SELECT "addresses_cities".* FROM "addresses_cities" WHERE "addresses_cities"."id" = ? LIMIT ? [["id", 10917], ["LIMIT", 1]]
315727
+ Addresses::State Load (0.1ms) SELECT "addresses_states".* FROM "addresses_states" WHERE "addresses_states"."id" = ? LIMIT ? [["id", 53], ["LIMIT", 1]]
315728
+ Completed 200 OK in 101ms (Views: 0.8ms | ActiveRecord: 3.3ms)
315729
+
315730
+
@@ -12543,3 +12543,801 @@ Completed 200 OK in 2ms (Views: 0.9ms | ActiveRecord: 0.2ms)
12543
12543
  SQL (0.2ms) INSERT INTO "addresses_addresses" ("number", "created_at", "updated_at", "zipcode_id") VALUES (?, ?, ?, ?) [["number", "Number"], ["created_at", 2016-09-21 17:26:32 UTC], ["updated_at", 2016-09-21 17:26:32 UTC], ["zipcode_id", 1]]
12544
12544
   (0.1ms) RELEASE SAVEPOINT active_record_1
12545
12545
   (1.1ms) rollback transaction
12546
+  (0.4ms) begin transaction
12547
+  (0.1ms) SAVEPOINT active_record_1
12548
+ SQL (1.2ms) INSERT INTO "addresses_countries" ("name", "acronym", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "Country name"], ["acronym", "Country acronym"], ["created_at", 2016-09-22 21:06:49 UTC], ["updated_at", 2016-09-22 21:06:49 UTC]]
12549
+  (0.1ms) RELEASE SAVEPOINT active_record_1
12550
+  (0.1ms) SAVEPOINT active_record_1
12551
+ SQL (0.9ms) INSERT INTO "addresses_states" ("name", "acronym", "country_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "State name"], ["acronym", "State acronym"], ["country_id", 1], ["created_at", 2016-09-22 21:06:50 UTC], ["updated_at", 2016-09-22 21:06:50 UTC]]
12552
+  (0.1ms) RELEASE SAVEPOINT active_record_1
12553
+  (0.1ms) SAVEPOINT active_record_1
12554
+ SQL (0.5ms) INSERT INTO "addresses_cities" ("name", "state_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "City name"], ["state_id", 1], ["created_at", 2016-09-22 21:06:50 UTC], ["updated_at", 2016-09-22 21:06:50 UTC]]
12555
+  (0.0ms) RELEASE SAVEPOINT active_record_1
12556
+ Processing by Addresses::CitiesController#index as JSON
12557
+ Parameters: {"state_id"=>"1"}
12558
+ Addresses::State Load (0.1ms) SELECT "addresses_states".* FROM "addresses_states" WHERE "addresses_states"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
12559
+ Addresses::City Load (0.1ms) SELECT "addresses_cities".* FROM "addresses_cities" WHERE "addresses_cities"."state_id" = ? ORDER BY name asc [["state_id", 1]]
12560
+ Completed 200 OK in 19ms (Views: 3.4ms | ActiveRecord: 0.3ms)
12561
+  (0.8ms) rollback transaction
12562
+  (0.1ms) begin transaction
12563
+  (0.0ms) SAVEPOINT active_record_1
12564
+ SQL (0.3ms) INSERT INTO "addresses_countries" ("name", "acronym", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "Country name"], ["acronym", "Country acronym"], ["created_at", 2016-09-22 21:06:50 UTC], ["updated_at", 2016-09-22 21:06:50 UTC]]
12565
+  (0.0ms) RELEASE SAVEPOINT active_record_1
12566
+  (0.0ms) SAVEPOINT active_record_1
12567
+ SQL (0.3ms) INSERT INTO "addresses_states" ("name", "acronym", "country_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "State name"], ["acronym", "State acronym"], ["country_id", 1], ["created_at", 2016-09-22 21:06:50 UTC], ["updated_at", 2016-09-22 21:06:50 UTC]]
12568
+  (0.0ms) RELEASE SAVEPOINT active_record_1
12569
+  (0.0ms) SAVEPOINT active_record_1
12570
+ SQL (0.1ms) INSERT INTO "addresses_cities" ("name", "state_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "City name"], ["state_id", 1], ["created_at", 2016-09-22 21:06:50 UTC], ["updated_at", 2016-09-22 21:06:50 UTC]]
12571
+  (0.0ms) RELEASE SAVEPOINT active_record_1
12572
+ Processing by Addresses::CitiesController#index as JSON
12573
+ Parameters: {"state_id"=>"1"}
12574
+ Addresses::State Load (0.0ms) SELECT "addresses_states".* FROM "addresses_states" WHERE "addresses_states"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
12575
+ Addresses::City Load (0.1ms) SELECT "addresses_cities".* FROM "addresses_cities" WHERE "addresses_cities"."state_id" = ? ORDER BY name asc [["state_id", 1]]
12576
+ Completed 200 OK in 3ms (Views: 0.9ms | ActiveRecord: 0.2ms)
12577
+  (0.8ms) rollback transaction
12578
+  (0.1ms) begin transaction
12579
+  (0.1ms) rollback transaction
12580
+  (0.1ms) begin transaction
12581
+  (0.1ms) rollback transaction
12582
+  (0.0ms) begin transaction
12583
+  (0.1ms) SAVEPOINT active_record_1
12584
+ SQL (0.3ms) INSERT INTO "addresses_countries" ("name", "acronym", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "Country name"], ["acronym", "Country acronym"], ["created_at", 2016-09-22 21:06:50 UTC], ["updated_at", 2016-09-22 21:06:50 UTC]]
12585
+  (0.0ms) RELEASE SAVEPOINT active_record_1
12586
+  (0.0ms) SAVEPOINT active_record_1
12587
+ SQL (0.3ms) INSERT INTO "addresses_states" ("name", "acronym", "country_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "State name"], ["acronym", "State acronym"], ["country_id", 1], ["created_at", 2016-09-22 21:06:50 UTC], ["updated_at", 2016-09-22 21:06:50 UTC]]
12588
+  (0.0ms) RELEASE SAVEPOINT active_record_1
12589
+  (0.0ms) SAVEPOINT active_record_1
12590
+ SQL (0.1ms) INSERT INTO "addresses_cities" ("name", "state_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "City name"], ["state_id", 1], ["created_at", 2016-09-22 21:06:50 UTC], ["updated_at", 2016-09-22 21:06:50 UTC]]
12591
+  (0.0ms) RELEASE SAVEPOINT active_record_1
12592
+  (0.0ms) SAVEPOINT active_record_1
12593
+ SQL (0.1ms) INSERT INTO "addresses_countries" ("name", "acronym", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "Country name"], ["acronym", "Country acronym"], ["created_at", 2016-09-22 21:06:50 UTC], ["updated_at", 2016-09-22 21:06:50 UTC]]
12594
+  (0.0ms) RELEASE SAVEPOINT active_record_1
12595
+  (0.0ms) SAVEPOINT active_record_1
12596
+ SQL (0.1ms) INSERT INTO "addresses_states" ("name", "acronym", "country_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "State name"], ["acronym", "State acronym"], ["country_id", 2], ["created_at", 2016-09-22 21:06:50 UTC], ["updated_at", 2016-09-22 21:06:50 UTC]]
12597
+  (0.0ms) RELEASE SAVEPOINT active_record_1
12598
+  (0.0ms) SAVEPOINT active_record_1
12599
+ SQL (0.1ms) INSERT INTO "addresses_cities" ("name", "state_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "City name"], ["state_id", 2], ["created_at", 2016-09-22 21:06:50 UTC], ["updated_at", 2016-09-22 21:06:50 UTC]]
12600
+  (0.0ms) RELEASE SAVEPOINT active_record_1
12601
+  (0.0ms) SAVEPOINT active_record_1
12602
+ SQL (0.1ms) INSERT INTO "addresses_neighborhoods" ("city_id", "name", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["city_id", 2], ["name", "Neighborhood name"], ["created_at", 2016-09-22 21:06:50 UTC], ["updated_at", 2016-09-22 21:06:50 UTC]]
12603
+  (0.0ms) RELEASE SAVEPOINT active_record_1
12604
+  (0.0ms) SAVEPOINT active_record_1
12605
+ SQL (0.9ms) INSERT INTO "addresses_zipcodes" ("street", "city_id", "neighborhood_id", "number", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["street", "Street name"], ["city_id", 1], ["neighborhood_id", 1], ["number", "12345678"], ["created_at", 2016-09-22 21:06:50 UTC], ["updated_at", 2016-09-22 21:06:50 UTC]]
12606
+  (0.1ms) RELEASE SAVEPOINT active_record_1
12607
+  (0.1ms) SAVEPOINT active_record_1
12608
+ SQL (0.2ms) INSERT INTO "addresses_addresses" ("number", "created_at", "updated_at", "zipcode_id") VALUES (?, ?, ?, ?) [["number", "Number"], ["created_at", 2016-09-22 21:06:50 UTC], ["updated_at", 2016-09-22 21:06:50 UTC], ["zipcode_id", 1]]
12609
+  (0.0ms) RELEASE SAVEPOINT active_record_1
12610
+  (1.4ms) rollback transaction
12611
+  (0.1ms) begin transaction
12612
+  (0.0ms) rollback transaction
12613
+  (0.1ms) begin transaction
12614
+  (0.0ms) rollback transaction
12615
+  (0.1ms) begin transaction
12616
+  (0.1ms) SAVEPOINT active_record_1
12617
+ SQL (0.3ms) INSERT INTO "addresses_countries" ("name", "acronym", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "Country name"], ["acronym", "Country acronym"], ["created_at", 2016-09-22 21:06:50 UTC], ["updated_at", 2016-09-22 21:06:50 UTC]]
12618
+  (0.0ms) RELEASE SAVEPOINT active_record_1
12619
+  (0.0ms) SAVEPOINT active_record_1
12620
+ SQL (0.3ms) INSERT INTO "addresses_states" ("name", "acronym", "country_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "State name"], ["acronym", "State acronym"], ["country_id", 1], ["created_at", 2016-09-22 21:06:50 UTC], ["updated_at", 2016-09-22 21:06:50 UTC]]
12621
+  (0.0ms) RELEASE SAVEPOINT active_record_1
12622
+  (0.1ms) SAVEPOINT active_record_1
12623
+ SQL (0.1ms) INSERT INTO "addresses_cities" ("name", "state_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "City name"], ["state_id", 1], ["created_at", 2016-09-22 21:06:50 UTC], ["updated_at", 2016-09-22 21:06:50 UTC]]
12624
+  (0.0ms) RELEASE SAVEPOINT active_record_1
12625
+ Started GET "/addresses/cities?state_id=1&format=json" for 127.0.0.1 at 2016-09-22 18:06:50 -0300
12626
+ Processing by Addresses::CitiesController#index as JSON
12627
+ Parameters: {"state_id"=>"1"}
12628
+ Addresses::State Load (0.1ms) SELECT "addresses_states".* FROM "addresses_states" WHERE "addresses_states"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
12629
+ Addresses::City Load (0.1ms) SELECT "addresses_cities".* FROM "addresses_cities" WHERE "addresses_cities"."state_id" = ? ORDER BY name asc [["state_id", 1]]
12630
+ Completed 200 OK in 3ms (Views: 1.0ms | ActiveRecord: 0.2ms)
12631
+  (1.0ms) rollback transaction
12632
+  (0.1ms) begin transaction
12633
+  (0.0ms) rollback transaction
12634
+  (0.1ms) begin transaction
12635
+  (0.1ms) rollback transaction
12636
+  (0.1ms) begin transaction
12637
+  (0.1ms) rollback transaction
12638
+  (0.0ms) begin transaction
12639
+  (0.1ms) rollback transaction
12640
+  (0.1ms) begin transaction
12641
+  (0.0ms) rollback transaction
12642
+  (0.1ms) begin transaction
12643
+  (0.1ms) rollback transaction
12644
+  (0.1ms) begin transaction
12645
+  (0.1ms) rollback transaction
12646
+  (0.1ms) begin transaction
12647
+  (0.1ms) rollback transaction
12648
+  (0.1ms) begin transaction
12649
+  (0.1ms) rollback transaction
12650
+  (0.1ms) begin transaction
12651
+  (0.1ms) rollback transaction
12652
+  (0.1ms) begin transaction
12653
+  (0.0ms) rollback transaction
12654
+  (0.1ms) begin transaction
12655
+  (0.0ms) rollback transaction
12656
+  (0.1ms) begin transaction
12657
+  (0.0ms) rollback transaction
12658
+  (0.1ms) begin transaction
12659
+  (0.0ms) rollback transaction
12660
+  (0.1ms) begin transaction
12661
+  (0.0ms) SAVEPOINT active_record_1
12662
+ SQL (0.5ms) INSERT INTO "addresses_countries" ("name", "acronym", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "Country name"], ["acronym", "Country acronym"], ["created_at", 2016-09-22 21:06:50 UTC], ["updated_at", 2016-09-22 21:06:50 UTC]]
12663
+  (0.0ms) RELEASE SAVEPOINT active_record_1
12664
+  (0.0ms) SAVEPOINT active_record_1
12665
+ SQL (0.3ms) INSERT INTO "addresses_states" ("name", "acronym", "country_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "State name"], ["acronym", "State acronym"], ["country_id", 1], ["created_at", 2016-09-22 21:06:50 UTC], ["updated_at", 2016-09-22 21:06:50 UTC]]
12666
+  (0.0ms) RELEASE SAVEPOINT active_record_1
12667
+  (0.1ms) SAVEPOINT active_record_1
12668
+ SQL (0.1ms) INSERT INTO "addresses_cities" ("name", "state_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "City name"], ["state_id", 1], ["created_at", 2016-09-22 21:06:50 UTC], ["updated_at", 2016-09-22 21:06:50 UTC]]
12669
+  (0.1ms) RELEASE SAVEPOINT active_record_1
12670
+  (0.0ms) SAVEPOINT active_record_1
12671
+ SQL (0.1ms) INSERT INTO "addresses_neighborhoods" ("city_id", "name", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["city_id", 1], ["name", "Neighborhood name"], ["created_at", 2016-09-22 21:06:50 UTC], ["updated_at", 2016-09-22 21:06:50 UTC]]
12672
+  (0.0ms) RELEASE SAVEPOINT active_record_1
12673
+ Processing by Addresses::NeighborhoodsController#index as JSON
12674
+ Parameters: {"city_id"=>"1"}
12675
+ Addresses::City Load (0.1ms) SELECT "addresses_cities".* FROM "addresses_cities" WHERE "addresses_cities"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
12676
+ Addresses::Neighborhood Load (0.1ms) SELECT "addresses_neighborhoods".* FROM "addresses_neighborhoods" WHERE "addresses_neighborhoods"."city_id" = ? ORDER BY name asc [["city_id", 1]]
12677
+ Completed 200 OK in 4ms (Views: 1.0ms | ActiveRecord: 0.2ms)
12678
+  (0.8ms) rollback transaction
12679
+  (0.1ms) begin transaction
12680
+  (0.1ms) SAVEPOINT active_record_1
12681
+ SQL (0.3ms) INSERT INTO "addresses_countries" ("name", "acronym", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "Country name"], ["acronym", "Country acronym"], ["created_at", 2016-09-22 21:06:50 UTC], ["updated_at", 2016-09-22 21:06:50 UTC]]
12682
+  (0.0ms) RELEASE SAVEPOINT active_record_1
12683
+  (0.0ms) SAVEPOINT active_record_1
12684
+ SQL (0.3ms) INSERT INTO "addresses_states" ("name", "acronym", "country_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "State name"], ["acronym", "State acronym"], ["country_id", 1], ["created_at", 2016-09-22 21:06:50 UTC], ["updated_at", 2016-09-22 21:06:50 UTC]]
12685
+  (0.0ms) RELEASE SAVEPOINT active_record_1
12686
+  (0.0ms) SAVEPOINT active_record_1
12687
+ SQL (0.2ms) INSERT INTO "addresses_cities" ("name", "state_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "City name"], ["state_id", 1], ["created_at", 2016-09-22 21:06:50 UTC], ["updated_at", 2016-09-22 21:06:50 UTC]]
12688
+  (0.1ms) RELEASE SAVEPOINT active_record_1
12689
+  (0.0ms) SAVEPOINT active_record_1
12690
+ SQL (0.1ms) INSERT INTO "addresses_neighborhoods" ("city_id", "name", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["city_id", 1], ["name", "Neighborhood name"], ["created_at", 2016-09-22 21:06:50 UTC], ["updated_at", 2016-09-22 21:06:50 UTC]]
12691
+  (0.0ms) RELEASE SAVEPOINT active_record_1
12692
+ Processing by Addresses::NeighborhoodsController#index as JSON
12693
+ Parameters: {"city_id"=>"1"}
12694
+ Addresses::City Load (0.1ms) SELECT "addresses_cities".* FROM "addresses_cities" WHERE "addresses_cities"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
12695
+ Addresses::Neighborhood Load (0.1ms) SELECT "addresses_neighborhoods".* FROM "addresses_neighborhoods" WHERE "addresses_neighborhoods"."city_id" = ? ORDER BY name asc [["city_id", 1]]
12696
+ Completed 200 OK in 3ms (Views: 0.9ms | ActiveRecord: 0.2ms)
12697
+  (8.1ms) rollback transaction
12698
+  (0.1ms) begin transaction
12699
+  (0.0ms) SAVEPOINT active_record_1
12700
+ SQL (0.2ms) INSERT INTO "addresses_countries" ("name", "acronym", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "Country name"], ["acronym", "Country acronym"], ["created_at", 2016-09-22 21:06:50 UTC], ["updated_at", 2016-09-22 21:06:50 UTC]]
12701
+  (0.0ms) RELEASE SAVEPOINT active_record_1
12702
+  (0.0ms) SAVEPOINT active_record_1
12703
+ SQL (0.3ms) INSERT INTO "addresses_states" ("name", "acronym", "country_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "State name"], ["acronym", "State acronym"], ["country_id", 1], ["created_at", 2016-09-22 21:06:50 UTC], ["updated_at", 2016-09-22 21:06:50 UTC]]
12704
+  (0.0ms) RELEASE SAVEPOINT active_record_1
12705
+  (0.0ms) SAVEPOINT active_record_1
12706
+ SQL (0.1ms) INSERT INTO "addresses_cities" ("name", "state_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "City name"], ["state_id", 1], ["created_at", 2016-09-22 21:06:50 UTC], ["updated_at", 2016-09-22 21:06:50 UTC]]
12707
+  (0.0ms) RELEASE SAVEPOINT active_record_1
12708
+  (0.0ms) SAVEPOINT active_record_1
12709
+ SQL (0.1ms) INSERT INTO "addresses_neighborhoods" ("city_id", "name", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["city_id", 1], ["name", "Neighborhood name"], ["created_at", 2016-09-22 21:06:50 UTC], ["updated_at", 2016-09-22 21:06:50 UTC]]
12710
+  (0.0ms) RELEASE SAVEPOINT active_record_1
12711
+ Started GET "/addresses/neighborhoods?city_id=1&format=json" for 127.0.0.1 at 2016-09-22 18:06:50 -0300
12712
+ Processing by Addresses::NeighborhoodsController#index as JSON
12713
+ Parameters: {"city_id"=>"1"}
12714
+ Addresses::City Load (0.0ms) SELECT "addresses_cities".* FROM "addresses_cities" WHERE "addresses_cities"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
12715
+ Addresses::Neighborhood Load (0.2ms) SELECT "addresses_neighborhoods".* FROM "addresses_neighborhoods" WHERE "addresses_neighborhoods"."city_id" = ? ORDER BY name asc [["city_id", 1]]
12716
+ Completed 200 OK in 2ms (Views: 0.9ms | ActiveRecord: 0.2ms)
12717
+  (1.1ms) rollback transaction
12718
+  (0.1ms) begin transaction
12719
+  (0.0ms) SAVEPOINT active_record_1
12720
+ SQL (0.2ms) INSERT INTO "addresses_countries" ("name", "acronym", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "Country name"], ["acronym", "Country acronym"], ["created_at", 2016-09-22 21:06:50 UTC], ["updated_at", 2016-09-22 21:06:50 UTC]]
12721
+  (0.0ms) RELEASE SAVEPOINT active_record_1
12722
+  (0.0ms) SAVEPOINT active_record_1
12723
+ SQL (0.3ms) INSERT INTO "addresses_states" ("name", "acronym", "country_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "State name"], ["acronym", "State acronym"], ["country_id", 1], ["created_at", 2016-09-22 21:06:50 UTC], ["updated_at", 2016-09-22 21:06:50 UTC]]
12724
+  (0.0ms) RELEASE SAVEPOINT active_record_1
12725
+  (0.0ms) SAVEPOINT active_record_1
12726
+ SQL (0.2ms) INSERT INTO "addresses_cities" ("name", "state_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "City name"], ["state_id", 1], ["created_at", 2016-09-22 21:06:50 UTC], ["updated_at", 2016-09-22 21:06:50 UTC]]
12727
+  (0.0ms) RELEASE SAVEPOINT active_record_1
12728
+  (0.0ms) SAVEPOINT active_record_1
12729
+ SQL (0.1ms) INSERT INTO "addresses_countries" ("name", "acronym", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "Country name"], ["acronym", "Country acronym"], ["created_at", 2016-09-22 21:06:50 UTC], ["updated_at", 2016-09-22 21:06:50 UTC]]
12730
+  (0.0ms) RELEASE SAVEPOINT active_record_1
12731
+  (0.0ms) SAVEPOINT active_record_1
12732
+ SQL (0.1ms) INSERT INTO "addresses_states" ("name", "acronym", "country_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "State name"], ["acronym", "State acronym"], ["country_id", 2], ["created_at", 2016-09-22 21:06:50 UTC], ["updated_at", 2016-09-22 21:06:50 UTC]]
12733
+  (0.0ms) RELEASE SAVEPOINT active_record_1
12734
+  (0.0ms) SAVEPOINT active_record_1
12735
+ SQL (0.1ms) INSERT INTO "addresses_cities" ("name", "state_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "City name"], ["state_id", 2], ["created_at", 2016-09-22 21:06:50 UTC], ["updated_at", 2016-09-22 21:06:50 UTC]]
12736
+  (0.0ms) RELEASE SAVEPOINT active_record_1
12737
+  (0.0ms) SAVEPOINT active_record_1
12738
+ SQL (0.1ms) INSERT INTO "addresses_neighborhoods" ("city_id", "name", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["city_id", 2], ["name", "Neighborhood name"], ["created_at", 2016-09-22 21:06:50 UTC], ["updated_at", 2016-09-22 21:06:50 UTC]]
12739
+  (0.0ms) RELEASE SAVEPOINT active_record_1
12740
+  (0.0ms) SAVEPOINT active_record_1
12741
+ SQL (0.1ms) INSERT INTO "addresses_zipcodes" ("street", "city_id", "neighborhood_id", "number", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["street", "Street name"], ["city_id", 1], ["neighborhood_id", 1], ["number", "12345678"], ["created_at", 2016-09-22 21:06:50 UTC], ["updated_at", 2016-09-22 21:06:50 UTC]]
12742
+  (0.1ms) RELEASE SAVEPOINT active_record_1
12743
+ Addresses::Zipcode Load (0.1ms) SELECT "addresses_zipcodes".* FROM "addresses_zipcodes" WHERE "addresses_zipcodes"."number" = ? LIMIT ? [["number", "12345678"], ["LIMIT", 1]]
12744
+ Addresses::City Load (0.0ms) SELECT "addresses_cities".* FROM "addresses_cities" WHERE "addresses_cities"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
12745
+ Addresses::State Load (0.0ms) SELECT "addresses_states".* FROM "addresses_states" WHERE "addresses_states"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
12746
+  (1.1ms) rollback transaction
12747
+  (0.1ms) begin transaction
12748
+ Addresses::Zipcode Load (0.1ms) SELECT "addresses_zipcodes".* FROM "addresses_zipcodes" WHERE "addresses_zipcodes"."number" = ? LIMIT ? [["number", "99999999"], ["LIMIT", 1]]
12749
+  (0.1ms) rollback transaction
12750
+  (0.0ms) begin transaction
12751
+ Addresses::Zipcode Load (0.1ms) SELECT "addresses_zipcodes".* FROM "addresses_zipcodes" WHERE "addresses_zipcodes"."number" = ? LIMIT ? [["number", "05012010"], ["LIMIT", 1]]
12752
+ Addresses::State Load (0.1ms) SELECT "addresses_states".* FROM "addresses_states" WHERE "addresses_states"."acronym" = ? LIMIT ? [["acronym", "SP"], ["LIMIT", 1]]
12753
+  (0.0ms) SAVEPOINT active_record_1
12754
+ SQL (0.3ms) INSERT INTO "addresses_states" ("acronym", "created_at", "updated_at") VALUES (?, ?, ?) [["acronym", "SP"], ["created_at", 2016-09-22 21:06:50 UTC], ["updated_at", 2016-09-22 21:06:50 UTC]]
12755
+  (0.0ms) RELEASE SAVEPOINT active_record_1
12756
+ Addresses::City Load (0.1ms) SELECT "addresses_cities".* FROM "addresses_cities" WHERE "addresses_cities"."name" = ? AND "addresses_cities"."state_id" = ? LIMIT ? [["name", "São Paulo"], ["state_id", 1], ["LIMIT", 1]]
12757
+  (0.1ms) SAVEPOINT active_record_1
12758
+ SQL (0.4ms) INSERT INTO "addresses_cities" ("name", "state_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "São Paulo"], ["state_id", 1], ["created_at", 2016-09-22 21:06:50 UTC], ["updated_at", 2016-09-22 21:06:50 UTC]]
12759
+  (0.1ms) RELEASE SAVEPOINT active_record_1
12760
+ Addresses::Neighborhood Load (0.1ms) SELECT "addresses_neighborhoods".* FROM "addresses_neighborhoods" WHERE "addresses_neighborhoods"."name" = ? AND "addresses_neighborhoods"."city_id" = ? LIMIT ? [["name", "Vila Pompeia"], ["city_id", 1], ["LIMIT", 1]]
12761
+  (0.0ms) SAVEPOINT active_record_1
12762
+ SQL (0.1ms) INSERT INTO "addresses_neighborhoods" ("city_id", "name", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["city_id", 1], ["name", "Vila Pompeia"], ["created_at", 2016-09-22 21:06:50 UTC], ["updated_at", 2016-09-22 21:06:50 UTC]]
12763
+  (0.0ms) RELEASE SAVEPOINT active_record_1
12764
+  (0.1ms) SAVEPOINT active_record_1
12765
+ Addresses::State Load (0.0ms) SELECT "addresses_states".* FROM "addresses_states" WHERE "addresses_states"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
12766
+ SQL (0.2ms) INSERT INTO "addresses_zipcodes" ("street", "city_id", "neighborhood_id", "number", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["street", "Rua Ministro Gastão Mesquita"], ["city_id", 1], ["neighborhood_id", 1], ["number", "05012010"], ["created_at", 2016-09-22 21:06:50 UTC], ["updated_at", 2016-09-22 21:06:50 UTC]]
12767
+  (0.1ms) RELEASE SAVEPOINT active_record_1
12768
+  (0.9ms) rollback transaction
12769
+  (0.1ms) begin transaction
12770
+ Addresses::Zipcode Load (0.1ms) SELECT "addresses_zipcodes".* FROM "addresses_zipcodes" WHERE "addresses_zipcodes"."number" = ? LIMIT ? [["number", "05012010"], ["LIMIT", 1]]
12771
+ Addresses::State Load (0.0ms) SELECT "addresses_states".* FROM "addresses_states" WHERE "addresses_states"."acronym" = ? LIMIT ? [["acronym", "SP"], ["LIMIT", 1]]
12772
+  (0.1ms) SAVEPOINT active_record_1
12773
+ SQL (0.2ms) INSERT INTO "addresses_states" ("acronym", "created_at", "updated_at") VALUES (?, ?, ?) [["acronym", "SP"], ["created_at", 2016-09-22 21:06:50 UTC], ["updated_at", 2016-09-22 21:06:50 UTC]]
12774
+  (0.1ms) RELEASE SAVEPOINT active_record_1
12775
+ Addresses::City Load (0.0ms) SELECT "addresses_cities".* FROM "addresses_cities" WHERE "addresses_cities"."name" = ? AND "addresses_cities"."state_id" = ? LIMIT ? [["name", "São Paulo"], ["state_id", 1], ["LIMIT", 1]]
12776
+  (0.0ms) SAVEPOINT active_record_1
12777
+ SQL (0.3ms) INSERT INTO "addresses_cities" ("name", "state_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "São Paulo"], ["state_id", 1], ["created_at", 2016-09-22 21:06:50 UTC], ["updated_at", 2016-09-22 21:06:50 UTC]]
12778
+  (0.0ms) RELEASE SAVEPOINT active_record_1
12779
+ Addresses::Neighborhood Load (0.0ms) SELECT "addresses_neighborhoods".* FROM "addresses_neighborhoods" WHERE "addresses_neighborhoods"."name" = ? AND "addresses_neighborhoods"."city_id" = ? LIMIT ? [["name", "Vila Pompeia"], ["city_id", 1], ["LIMIT", 1]]
12780
+  (0.0ms) SAVEPOINT active_record_1
12781
+ SQL (0.1ms) INSERT INTO "addresses_neighborhoods" ("city_id", "name", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["city_id", 1], ["name", "Vila Pompeia"], ["created_at", 2016-09-22 21:06:50 UTC], ["updated_at", 2016-09-22 21:06:50 UTC]]
12782
+  (0.0ms) RELEASE SAVEPOINT active_record_1
12783
+  (0.0ms) SAVEPOINT active_record_1
12784
+ Addresses::State Load (0.0ms) SELECT "addresses_states".* FROM "addresses_states" WHERE "addresses_states"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
12785
+ SQL (0.1ms) INSERT INTO "addresses_zipcodes" ("street", "city_id", "neighborhood_id", "number", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["street", "Rua Ministro Gastão Mesquita"], ["city_id", 1], ["neighborhood_id", 1], ["number", "05012010"], ["created_at", 2016-09-22 21:06:50 UTC], ["updated_at", 2016-09-22 21:06:50 UTC]]
12786
+  (0.0ms) RELEASE SAVEPOINT active_record_1
12787
+  (1.4ms) rollback transaction
12788
+  (0.0ms) begin transaction
12789
+ Addresses::Zipcode Load (0.1ms) SELECT "addresses_zipcodes".* FROM "addresses_zipcodes" WHERE "addresses_zipcodes"."number" = ? LIMIT ? [["number", "05012010"], ["LIMIT", 1]]
12790
+ Addresses::State Load (0.0ms) SELECT "addresses_states".* FROM "addresses_states" WHERE "addresses_states"."acronym" = ? LIMIT ? [["acronym", "SP"], ["LIMIT", 1]]
12791
+  (0.1ms) SAVEPOINT active_record_1
12792
+ SQL (0.3ms) INSERT INTO "addresses_states" ("acronym", "created_at", "updated_at") VALUES (?, ?, ?) [["acronym", "SP"], ["created_at", 2016-09-22 21:06:50 UTC], ["updated_at", 2016-09-22 21:06:50 UTC]]
12793
+  (0.0ms) RELEASE SAVEPOINT active_record_1
12794
+ Addresses::City Load (0.1ms) SELECT "addresses_cities".* FROM "addresses_cities" WHERE "addresses_cities"."name" = ? AND "addresses_cities"."state_id" = ? LIMIT ? [["name", "São Paulo"], ["state_id", 1], ["LIMIT", 1]]
12795
+  (0.0ms) SAVEPOINT active_record_1
12796
+ SQL (0.4ms) INSERT INTO "addresses_cities" ("name", "state_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "São Paulo"], ["state_id", 1], ["created_at", 2016-09-22 21:06:50 UTC], ["updated_at", 2016-09-22 21:06:50 UTC]]
12797
+  (0.1ms) RELEASE SAVEPOINT active_record_1
12798
+ Addresses::Neighborhood Load (0.0ms) SELECT "addresses_neighborhoods".* FROM "addresses_neighborhoods" WHERE "addresses_neighborhoods"."name" = ? AND "addresses_neighborhoods"."city_id" = ? LIMIT ? [["name", "Vila Pompeia"], ["city_id", 1], ["LIMIT", 1]]
12799
+  (0.1ms) SAVEPOINT active_record_1
12800
+ SQL (0.1ms) INSERT INTO "addresses_neighborhoods" ("city_id", "name", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["city_id", 1], ["name", "Vila Pompeia"], ["created_at", 2016-09-22 21:06:50 UTC], ["updated_at", 2016-09-22 21:06:50 UTC]]
12801
+  (0.0ms) RELEASE SAVEPOINT active_record_1
12802
+  (0.0ms) SAVEPOINT active_record_1
12803
+ Addresses::State Load (0.0ms) SELECT "addresses_states".* FROM "addresses_states" WHERE "addresses_states"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
12804
+ SQL (0.1ms) INSERT INTO "addresses_zipcodes" ("street", "city_id", "neighborhood_id", "number", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["street", "Rua Ministro Gastão Mesquita"], ["city_id", 1], ["neighborhood_id", 1], ["number", "05012010"], ["created_at", 2016-09-22 21:06:50 UTC], ["updated_at", 2016-09-22 21:06:50 UTC]]
12805
+  (0.0ms) RELEASE SAVEPOINT active_record_1
12806
+  (0.9ms) rollback transaction
12807
+  (0.1ms) begin transaction
12808
+  (0.1ms) rollback transaction
12809
+  (0.1ms) begin transaction
12810
+  (0.1ms) rollback transaction
12811
+  (0.1ms) begin transaction
12812
+  (0.0ms) rollback transaction
12813
+  (0.1ms) begin transaction
12814
+  (0.0ms) SAVEPOINT active_record_1
12815
+ SQL (0.3ms) INSERT INTO "addresses_countries" ("name", "acronym", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "Country name"], ["acronym", "Country acronym"], ["created_at", 2016-09-22 21:06:50 UTC], ["updated_at", 2016-09-22 21:06:50 UTC]]
12816
+  (0.0ms) RELEASE SAVEPOINT active_record_1
12817
+  (0.0ms) SAVEPOINT active_record_1
12818
+ SQL (0.3ms) INSERT INTO "addresses_states" ("name", "acronym", "country_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "State name"], ["acronym", "State acronym"], ["country_id", 1], ["created_at", 2016-09-22 21:06:50 UTC], ["updated_at", 2016-09-22 21:06:50 UTC]]
12819
+  (0.1ms) RELEASE SAVEPOINT active_record_1
12820
+  (0.0ms) SAVEPOINT active_record_1
12821
+ SQL (0.1ms) INSERT INTO "addresses_cities" ("name", "state_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "City name"], ["state_id", 1], ["created_at", 2016-09-22 21:06:50 UTC], ["updated_at", 2016-09-22 21:06:50 UTC]]
12822
+  (0.0ms) RELEASE SAVEPOINT active_record_1
12823
+  (0.0ms) SAVEPOINT active_record_1
12824
+ SQL (0.1ms) INSERT INTO "addresses_countries" ("name", "acronym", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "Country name"], ["acronym", "Country acronym"], ["created_at", 2016-09-22 21:06:50 UTC], ["updated_at", 2016-09-22 21:06:50 UTC]]
12825
+  (0.0ms) RELEASE SAVEPOINT active_record_1
12826
+  (0.0ms) SAVEPOINT active_record_1
12827
+ SQL (0.1ms) INSERT INTO "addresses_states" ("name", "acronym", "country_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "State name"], ["acronym", "State acronym"], ["country_id", 2], ["created_at", 2016-09-22 21:06:50 UTC], ["updated_at", 2016-09-22 21:06:50 UTC]]
12828
+  (0.0ms) RELEASE SAVEPOINT active_record_1
12829
+  (0.0ms) SAVEPOINT active_record_1
12830
+ SQL (0.1ms) INSERT INTO "addresses_cities" ("name", "state_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "City name"], ["state_id", 2], ["created_at", 2016-09-22 21:06:50 UTC], ["updated_at", 2016-09-22 21:06:50 UTC]]
12831
+  (0.0ms) RELEASE SAVEPOINT active_record_1
12832
+  (0.0ms) SAVEPOINT active_record_1
12833
+ SQL (0.1ms) INSERT INTO "addresses_neighborhoods" ("city_id", "name", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["city_id", 2], ["name", "Neighborhood name"], ["created_at", 2016-09-22 21:06:50 UTC], ["updated_at", 2016-09-22 21:06:50 UTC]]
12834
+  (0.0ms) RELEASE SAVEPOINT active_record_1
12835
+  (0.0ms) SAVEPOINT active_record_1
12836
+ SQL (0.2ms) INSERT INTO "addresses_zipcodes" ("street", "city_id", "neighborhood_id", "number", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["street", "Street name"], ["city_id", 1], ["neighborhood_id", 1], ["number", "12345678"], ["created_at", 2016-09-22 21:06:50 UTC], ["updated_at", 2016-09-22 21:06:50 UTC]]
12837
+  (0.0ms) RELEASE SAVEPOINT active_record_1
12838
+  (1.1ms) rollback transaction
12839
+  (0.1ms) begin transaction
12840
+  (0.1ms) rollback transaction
12841
+  (0.1ms) begin transaction
12842
+  (0.1ms) rollback transaction
12843
+  (0.1ms) begin transaction
12844
+  (0.1ms) rollback transaction
12845
+  (0.1ms) begin transaction
12846
+  (0.0ms) rollback transaction
12847
+  (0.1ms) begin transaction
12848
+  (0.1ms) SAVEPOINT active_record_1
12849
+ SQL (0.4ms) INSERT INTO "addresses_countries" ("name", "acronym", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "Country name"], ["acronym", "Country acronym"], ["created_at", 2016-09-22 21:06:50 UTC], ["updated_at", 2016-09-22 21:06:50 UTC]]
12850
+  (0.1ms) RELEASE SAVEPOINT active_record_1
12851
+  (0.0ms) SAVEPOINT active_record_1
12852
+ SQL (0.3ms) INSERT INTO "addresses_states" ("name", "acronym", "country_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "State name"], ["acronym", "State acronym"], ["country_id", 1], ["created_at", 2016-09-22 21:06:50 UTC], ["updated_at", 2016-09-22 21:06:50 UTC]]
12853
+  (0.0ms) RELEASE SAVEPOINT active_record_1
12854
+  (0.1ms) SAVEPOINT active_record_1
12855
+ SQL (0.1ms) INSERT INTO "addresses_cities" ("name", "state_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "City name"], ["state_id", 1], ["created_at", 2016-09-22 21:06:50 UTC], ["updated_at", 2016-09-22 21:06:50 UTC]]
12856
+  (0.1ms) RELEASE SAVEPOINT active_record_1
12857
+  (0.0ms) SAVEPOINT active_record_1
12858
+ SQL (0.2ms) INSERT INTO "addresses_neighborhoods" ("city_id", "name", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["city_id", 1], ["name", "Neighborhood name"], ["created_at", 2016-09-22 21:06:50 UTC], ["updated_at", 2016-09-22 21:06:50 UTC]]
12859
+  (0.1ms) RELEASE SAVEPOINT active_record_1
12860
+  (0.0ms) SAVEPOINT active_record_1
12861
+ SQL (0.1ms) INSERT INTO "addresses_zipcodes" ("street", "city_id", "neighborhood_id", "number", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["street", "Street name"], ["city_id", 1], ["neighborhood_id", 1], ["number", "05012010"], ["created_at", 2016-09-22 21:06:50 UTC], ["updated_at", 2016-09-22 21:06:50 UTC]]
12862
+  (0.1ms) RELEASE SAVEPOINT active_record_1
12863
+ Processing by Addresses::ZipcodesController#show as JSON
12864
+ Parameters: {"zipcode"=>"05012010"}
12865
+ Addresses::Zipcode Load (0.1ms) SELECT "addresses_zipcodes".* FROM "addresses_zipcodes" WHERE "addresses_zipcodes"."number" = ? LIMIT ? [["number", "05012010"], ["LIMIT", 1]]
12866
+ Addresses::City Load (0.0ms) SELECT "addresses_cities".* FROM "addresses_cities" WHERE "addresses_cities"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
12867
+ Addresses::State Load (0.0ms) SELECT "addresses_states".* FROM "addresses_states" WHERE "addresses_states"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
12868
+ Completed 200 OK in 3ms (Views: 0.6ms | ActiveRecord: 0.1ms)
12869
+  (1.1ms) rollback transaction
12870
+  (0.1ms) begin transaction
12871
+  (0.0ms) SAVEPOINT active_record_1
12872
+ SQL (0.2ms) INSERT INTO "addresses_countries" ("name", "acronym", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "Country name"], ["acronym", "Country acronym"], ["created_at", 2016-09-22 21:06:50 UTC], ["updated_at", 2016-09-22 21:06:50 UTC]]
12873
+  (0.1ms) RELEASE SAVEPOINT active_record_1
12874
+  (0.0ms) SAVEPOINT active_record_1
12875
+ SQL (0.3ms) INSERT INTO "addresses_states" ("name", "acronym", "country_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "State name"], ["acronym", "State acronym"], ["country_id", 1], ["created_at", 2016-09-22 21:06:50 UTC], ["updated_at", 2016-09-22 21:06:50 UTC]]
12876
+  (0.0ms) RELEASE SAVEPOINT active_record_1
12877
+  (0.0ms) SAVEPOINT active_record_1
12878
+ SQL (0.1ms) INSERT INTO "addresses_cities" ("name", "state_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "City name"], ["state_id", 1], ["created_at", 2016-09-22 21:06:50 UTC], ["updated_at", 2016-09-22 21:06:50 UTC]]
12879
+  (0.0ms) RELEASE SAVEPOINT active_record_1
12880
+  (0.0ms) SAVEPOINT active_record_1
12881
+ SQL (0.1ms) INSERT INTO "addresses_neighborhoods" ("city_id", "name", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["city_id", 1], ["name", "Neighborhood name"], ["created_at", 2016-09-22 21:06:50 UTC], ["updated_at", 2016-09-22 21:06:50 UTC]]
12882
+  (0.0ms) RELEASE SAVEPOINT active_record_1
12883
+  (0.0ms) SAVEPOINT active_record_1
12884
+ SQL (0.2ms) INSERT INTO "addresses_zipcodes" ("street", "city_id", "neighborhood_id", "number", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["street", "Street name"], ["city_id", 1], ["neighborhood_id", 1], ["number", "05012010"], ["created_at", 2016-09-22 21:06:50 UTC], ["updated_at", 2016-09-22 21:06:50 UTC]]
12885
+  (0.0ms) RELEASE SAVEPOINT active_record_1
12886
+ Processing by Addresses::ZipcodesController#show as JSON
12887
+ Parameters: {"zipcode"=>"05012010"}
12888
+ Addresses::Zipcode Load (0.1ms) SELECT "addresses_zipcodes".* FROM "addresses_zipcodes" WHERE "addresses_zipcodes"."number" = ? LIMIT ? [["number", "05012010"], ["LIMIT", 1]]
12889
+ Addresses::City Load (0.1ms) SELECT "addresses_cities".* FROM "addresses_cities" WHERE "addresses_cities"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
12890
+ Addresses::State Load (0.0ms) SELECT "addresses_states".* FROM "addresses_states" WHERE "addresses_states"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
12891
+ Completed 200 OK in 3ms (Views: 0.5ms | ActiveRecord: 0.2ms)
12892
+  (1.2ms) rollback transaction
12893
+  (0.1ms) begin transaction
12894
+  (0.1ms) SAVEPOINT active_record_1
12895
+ SQL (0.2ms) INSERT INTO "addresses_countries" ("name", "acronym", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "Country name"], ["acronym", "Country acronym"], ["created_at", 2016-09-22 21:06:50 UTC], ["updated_at", 2016-09-22 21:06:50 UTC]]
12896
+  (0.1ms) RELEASE SAVEPOINT active_record_1
12897
+  (0.0ms) SAVEPOINT active_record_1
12898
+ SQL (0.3ms) INSERT INTO "addresses_states" ("name", "acronym", "country_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "State name"], ["acronym", "State acronym"], ["country_id", 1], ["created_at", 2016-09-22 21:06:50 UTC], ["updated_at", 2016-09-22 21:06:50 UTC]]
12899
+  (0.0ms) RELEASE SAVEPOINT active_record_1
12900
+  (0.0ms) SAVEPOINT active_record_1
12901
+ SQL (0.2ms) INSERT INTO "addresses_cities" ("name", "state_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "City name"], ["state_id", 1], ["created_at", 2016-09-22 21:06:50 UTC], ["updated_at", 2016-09-22 21:06:50 UTC]]
12902
+  (0.1ms) RELEASE SAVEPOINT active_record_1
12903
+  (0.1ms) SAVEPOINT active_record_1
12904
+ SQL (0.1ms) INSERT INTO "addresses_neighborhoods" ("city_id", "name", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["city_id", 1], ["name", "Neighborhood name"], ["created_at", 2016-09-22 21:06:50 UTC], ["updated_at", 2016-09-22 21:06:50 UTC]]
12905
+  (0.0ms) RELEASE SAVEPOINT active_record_1
12906
+  (0.0ms) SAVEPOINT active_record_1
12907
+ SQL (0.1ms) INSERT INTO "addresses_zipcodes" ("street", "city_id", "neighborhood_id", "number", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["street", "Street name"], ["city_id", 1], ["neighborhood_id", 1], ["number", "05012010"], ["created_at", 2016-09-22 21:06:50 UTC], ["updated_at", 2016-09-22 21:06:50 UTC]]
12908
+  (0.0ms) RELEASE SAVEPOINT active_record_1
12909
+ Processing by Addresses::ZipcodesController#show as JSON
12910
+ Parameters: {"zipcode"=>"99999999"}
12911
+ Addresses::Zipcode Load (0.0ms) SELECT "addresses_zipcodes".* FROM "addresses_zipcodes" WHERE "addresses_zipcodes"."number" = ? LIMIT ? [["number", "99999999"], ["LIMIT", 1]]
12912
+ Completed 422 Unprocessable Entity in 5ms (Views: 0.3ms | ActiveRecord: 0.0ms)
12913
+  (0.8ms) rollback transaction
12914
+  (0.1ms) begin transaction
12915
+  (0.1ms) rollback transaction
12916
+  (0.0ms) begin transaction
12917
+  (0.0ms) rollback transaction
12918
+  (0.1ms) begin transaction
12919
+  (0.1ms) rollback transaction
12920
+  (0.0ms) begin transaction
12921
+  (0.0ms) SAVEPOINT active_record_1
12922
+ SQL (0.4ms) INSERT INTO "addresses_countries" ("name", "acronym", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "Country name"], ["acronym", "Country acronym"], ["created_at", 2016-09-22 21:06:50 UTC], ["updated_at", 2016-09-22 21:06:50 UTC]]
12923
+  (0.1ms) RELEASE SAVEPOINT active_record_1
12924
+  (0.0ms) SAVEPOINT active_record_1
12925
+ SQL (0.3ms) INSERT INTO "addresses_states" ("name", "acronym", "country_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "State name"], ["acronym", "State acronym"], ["country_id", 1], ["created_at", 2016-09-22 21:06:50 UTC], ["updated_at", 2016-09-22 21:06:50 UTC]]
12926
+  (0.0ms) RELEASE SAVEPOINT active_record_1
12927
+  (0.0ms) SAVEPOINT active_record_1
12928
+ SQL (0.1ms) INSERT INTO "addresses_cities" ("name", "state_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "City name"], ["state_id", 1], ["created_at", 2016-09-22 21:06:50 UTC], ["updated_at", 2016-09-22 21:06:50 UTC]]
12929
+  (0.0ms) RELEASE SAVEPOINT active_record_1
12930
+  (0.0ms) SAVEPOINT active_record_1
12931
+ SQL (0.1ms) INSERT INTO "addresses_neighborhoods" ("city_id", "name", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["city_id", 1], ["name", "Neighborhood name"], ["created_at", 2016-09-22 21:06:50 UTC], ["updated_at", 2016-09-22 21:06:50 UTC]]
12932
+  (0.0ms) RELEASE SAVEPOINT active_record_1
12933
+  (0.0ms) SAVEPOINT active_record_1
12934
+ SQL (0.1ms) INSERT INTO "addresses_zipcodes" ("street", "city_id", "neighborhood_id", "number", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["street", "Street name"], ["city_id", 1], ["neighborhood_id", 1], ["number", "05012010"], ["created_at", 2016-09-22 21:06:50 UTC], ["updated_at", 2016-09-22 21:06:50 UTC]]
12935
+  (0.0ms) RELEASE SAVEPOINT active_record_1
12936
+ Started GET "/addresses/zipcodes/05012010?format=json" for 127.0.0.1 at 2016-09-22 18:06:50 -0300
12937
+ Processing by Addresses::ZipcodesController#show as JSON
12938
+ Parameters: {"zipcode"=>"05012010"}
12939
+ Addresses::Zipcode Load (0.1ms) SELECT "addresses_zipcodes".* FROM "addresses_zipcodes" WHERE "addresses_zipcodes"."number" = ? LIMIT ? [["number", "05012010"], ["LIMIT", 1]]
12940
+ Addresses::City Load (0.0ms) SELECT "addresses_cities".* FROM "addresses_cities" WHERE "addresses_cities"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
12941
+ Addresses::State Load (0.0ms) SELECT "addresses_states".* FROM "addresses_states" WHERE "addresses_states"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
12942
+ Completed 200 OK in 3ms (Views: 0.6ms | ActiveRecord: 0.1ms)
12943
+  (1.1ms) rollback transaction
12944
+  (0.4ms) begin transaction
12945
+  (0.1ms) rollback transaction
12946
+  (0.1ms) begin transaction
12947
+  (0.1ms) rollback transaction
12948
+  (0.0ms) begin transaction
12949
+  (0.1ms) rollback transaction
12950
+  (0.1ms) begin transaction
12951
+  (0.0ms) rollback transaction
12952
+  (0.0ms) begin transaction
12953
+  (0.1ms) rollback transaction
12954
+  (0.1ms) begin transaction
12955
+  (0.1ms) rollback transaction
12956
+  (0.1ms) begin transaction
12957
+  (0.1ms) SAVEPOINT active_record_1
12958
+ SQL (0.4ms) INSERT INTO "addresses_countries" ("name", "acronym", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "Country name"], ["acronym", "Country acronym"], ["created_at", 2016-09-22 21:21:31 UTC], ["updated_at", 2016-09-22 21:21:31 UTC]]
12959
+  (0.1ms) RELEASE SAVEPOINT active_record_1
12960
+  (0.1ms) SAVEPOINT active_record_1
12961
+ SQL (0.3ms) INSERT INTO "addresses_states" ("name", "acronym", "country_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "State name"], ["acronym", "State acronym"], ["country_id", 1], ["created_at", 2016-09-22 21:21:31 UTC], ["updated_at", 2016-09-22 21:21:31 UTC]]
12962
+  (0.0ms) RELEASE SAVEPOINT active_record_1
12963
+  (0.1ms) SAVEPOINT active_record_1
12964
+ SQL (0.1ms) INSERT INTO "addresses_cities" ("name", "state_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "City name"], ["state_id", 1], ["created_at", 2016-09-22 21:21:31 UTC], ["updated_at", 2016-09-22 21:21:31 UTC]]
12965
+  (0.0ms) RELEASE SAVEPOINT active_record_1
12966
+  (0.1ms) SAVEPOINT active_record_1
12967
+ SQL (0.2ms) INSERT INTO "addresses_neighborhoods" ("city_id", "name", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["city_id", 1], ["name", "Neighborhood name"], ["created_at", 2016-09-22 21:21:31 UTC], ["updated_at", 2016-09-22 21:21:31 UTC]]
12968
+  (0.0ms) RELEASE SAVEPOINT active_record_1
12969
+ Processing by Addresses::NeighborhoodsController#index as JSON
12970
+ Parameters: {"city_id"=>"1"}
12971
+ Addresses::City Load (0.1ms) SELECT "addresses_cities".* FROM "addresses_cities" WHERE "addresses_cities"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
12972
+ Addresses::Neighborhood Load (0.1ms) SELECT "addresses_neighborhoods".* FROM "addresses_neighborhoods" WHERE "addresses_neighborhoods"."city_id" = ? ORDER BY name asc [["city_id", 1]]
12973
+ Completed 200 OK in 15ms (Views: 2.5ms | ActiveRecord: 0.3ms)
12974
+  (1.1ms) rollback transaction
12975
+  (0.0ms) begin transaction
12976
+  (0.1ms) SAVEPOINT active_record_1
12977
+ SQL (0.2ms) INSERT INTO "addresses_countries" ("name", "acronym", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "Country name"], ["acronym", "Country acronym"], ["created_at", 2016-09-22 21:21:31 UTC], ["updated_at", 2016-09-22 21:21:31 UTC]]
12978
+  (0.0ms) RELEASE SAVEPOINT active_record_1
12979
+  (0.1ms) SAVEPOINT active_record_1
12980
+ SQL (0.3ms) INSERT INTO "addresses_states" ("name", "acronym", "country_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "State name"], ["acronym", "State acronym"], ["country_id", 1], ["created_at", 2016-09-22 21:21:31 UTC], ["updated_at", 2016-09-22 21:21:31 UTC]]
12981
+  (0.0ms) RELEASE SAVEPOINT active_record_1
12982
+  (0.0ms) SAVEPOINT active_record_1
12983
+ SQL (0.1ms) INSERT INTO "addresses_cities" ("name", "state_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "City name"], ["state_id", 1], ["created_at", 2016-09-22 21:21:31 UTC], ["updated_at", 2016-09-22 21:21:31 UTC]]
12984
+  (0.0ms) RELEASE SAVEPOINT active_record_1
12985
+  (0.0ms) SAVEPOINT active_record_1
12986
+ SQL (0.1ms) INSERT INTO "addresses_neighborhoods" ("city_id", "name", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["city_id", 1], ["name", "Neighborhood name"], ["created_at", 2016-09-22 21:21:31 UTC], ["updated_at", 2016-09-22 21:21:31 UTC]]
12987
+  (0.0ms) RELEASE SAVEPOINT active_record_1
12988
+ Processing by Addresses::NeighborhoodsController#index as JSON
12989
+ Parameters: {"city_id"=>"1"}
12990
+ Addresses::City Load (0.1ms) SELECT "addresses_cities".* FROM "addresses_cities" WHERE "addresses_cities"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
12991
+ Addresses::Neighborhood Load (0.1ms) SELECT "addresses_neighborhoods".* FROM "addresses_neighborhoods" WHERE "addresses_neighborhoods"."city_id" = ? ORDER BY name asc [["city_id", 1]]
12992
+ Completed 200 OK in 2ms (Views: 0.9ms | ActiveRecord: 0.2ms)
12993
+  (0.9ms) rollback transaction
12994
+  (0.1ms) begin transaction
12995
+  (0.1ms) rollback transaction
12996
+  (0.1ms) begin transaction
12997
+  (0.1ms) rollback transaction
12998
+  (0.0ms) begin transaction
12999
+  (0.1ms) rollback transaction
13000
+  (0.0ms) begin transaction
13001
+  (0.1ms) SAVEPOINT active_record_1
13002
+ SQL (0.2ms) INSERT INTO "addresses_countries" ("name", "acronym", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "Country name"], ["acronym", "Country acronym"], ["created_at", 2016-09-22 21:21:31 UTC], ["updated_at", 2016-09-22 21:21:31 UTC]]
13003
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13004
+  (0.0ms) SAVEPOINT active_record_1
13005
+ SQL (0.3ms) INSERT INTO "addresses_states" ("name", "acronym", "country_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "State name"], ["acronym", "State acronym"], ["country_id", 1], ["created_at", 2016-09-22 21:21:31 UTC], ["updated_at", 2016-09-22 21:21:31 UTC]]
13006
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13007
+  (0.0ms) SAVEPOINT active_record_1
13008
+ SQL (0.1ms) INSERT INTO "addresses_cities" ("name", "state_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "City name"], ["state_id", 1], ["created_at", 2016-09-22 21:21:31 UTC], ["updated_at", 2016-09-22 21:21:31 UTC]]
13009
+  (0.1ms) RELEASE SAVEPOINT active_record_1
13010
+  (0.1ms) SAVEPOINT active_record_1
13011
+ SQL (0.1ms) INSERT INTO "addresses_countries" ("name", "acronym", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "Country name"], ["acronym", "Country acronym"], ["created_at", 2016-09-22 21:21:31 UTC], ["updated_at", 2016-09-22 21:21:31 UTC]]
13012
+  (0.1ms) RELEASE SAVEPOINT active_record_1
13013
+  (0.1ms) SAVEPOINT active_record_1
13014
+ SQL (0.1ms) INSERT INTO "addresses_states" ("name", "acronym", "country_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "State name"], ["acronym", "State acronym"], ["country_id", 2], ["created_at", 2016-09-22 21:21:31 UTC], ["updated_at", 2016-09-22 21:21:31 UTC]]
13015
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13016
+  (0.1ms) SAVEPOINT active_record_1
13017
+ SQL (0.1ms) INSERT INTO "addresses_cities" ("name", "state_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "City name"], ["state_id", 2], ["created_at", 2016-09-22 21:21:31 UTC], ["updated_at", 2016-09-22 21:21:31 UTC]]
13018
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13019
+  (0.0ms) SAVEPOINT active_record_1
13020
+ SQL (0.1ms) INSERT INTO "addresses_neighborhoods" ("city_id", "name", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["city_id", 2], ["name", "Neighborhood name"], ["created_at", 2016-09-22 21:21:31 UTC], ["updated_at", 2016-09-22 21:21:31 UTC]]
13021
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13022
+  (0.0ms) SAVEPOINT active_record_1
13023
+ SQL (0.2ms) INSERT INTO "addresses_zipcodes" ("street", "city_id", "neighborhood_id", "number", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["street", "Street name"], ["city_id", 1], ["neighborhood_id", 1], ["number", "12345678"], ["created_at", 2016-09-22 21:21:31 UTC], ["updated_at", 2016-09-22 21:21:31 UTC]]
13024
+  (0.1ms) RELEASE SAVEPOINT active_record_1
13025
+  (1.2ms) rollback transaction
13026
+  (0.0ms) begin transaction
13027
+  (0.1ms) rollback transaction
13028
+  (0.1ms) begin transaction
13029
+  (0.1ms) rollback transaction
13030
+  (0.1ms) begin transaction
13031
+  (0.1ms) rollback transaction
13032
+  (0.1ms) begin transaction
13033
+  (0.1ms) rollback transaction
13034
+  (0.0ms) begin transaction
13035
+ Addresses::Zipcode Load (0.2ms) SELECT "addresses_zipcodes".* FROM "addresses_zipcodes" WHERE "addresses_zipcodes"."number" = ? LIMIT ? [["number", "05012010"], ["LIMIT", 1]]
13036
+ Addresses::State Load (0.1ms) SELECT "addresses_states".* FROM "addresses_states" WHERE "addresses_states"."acronym" = ? LIMIT ? [["acronym", "SP"], ["LIMIT", 1]]
13037
+  (0.0ms) SAVEPOINT active_record_1
13038
+ SQL (0.3ms) INSERT INTO "addresses_states" ("acronym", "created_at", "updated_at") VALUES (?, ?, ?) [["acronym", "SP"], ["created_at", 2016-09-22 21:21:31 UTC], ["updated_at", 2016-09-22 21:21:31 UTC]]
13039
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13040
+ Addresses::City Load (0.1ms) SELECT "addresses_cities".* FROM "addresses_cities" WHERE "addresses_cities"."name" = ? AND "addresses_cities"."state_id" = ? LIMIT ? [["name", "São Paulo"], ["state_id", 1], ["LIMIT", 1]]
13041
+  (0.1ms) SAVEPOINT active_record_1
13042
+ SQL (0.3ms) INSERT INTO "addresses_cities" ("name", "state_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "São Paulo"], ["state_id", 1], ["created_at", 2016-09-22 21:21:31 UTC], ["updated_at", 2016-09-22 21:21:31 UTC]]
13043
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13044
+ Addresses::Neighborhood Load (0.1ms) SELECT "addresses_neighborhoods".* FROM "addresses_neighborhoods" WHERE "addresses_neighborhoods"."name" = ? AND "addresses_neighborhoods"."city_id" = ? LIMIT ? [["name", "Vila Pompeia"], ["city_id", 1], ["LIMIT", 1]]
13045
+  (0.0ms) SAVEPOINT active_record_1
13046
+ SQL (0.1ms) INSERT INTO "addresses_neighborhoods" ("city_id", "name", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["city_id", 1], ["name", "Vila Pompeia"], ["created_at", 2016-09-22 21:21:31 UTC], ["updated_at", 2016-09-22 21:21:31 UTC]]
13047
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13048
+  (0.0ms) SAVEPOINT active_record_1
13049
+ Addresses::State Load (0.1ms) SELECT "addresses_states".* FROM "addresses_states" WHERE "addresses_states"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
13050
+ SQL (0.1ms) INSERT INTO "addresses_zipcodes" ("street", "city_id", "neighborhood_id", "number", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["street", "Rua Ministro Gastão Mesquita"], ["city_id", 1], ["neighborhood_id", 1], ["number", "05012010"], ["created_at", 2016-09-22 21:21:31 UTC], ["updated_at", 2016-09-22 21:21:31 UTC]]
13051
+  (0.1ms) RELEASE SAVEPOINT active_record_1
13052
+  (0.9ms) rollback transaction
13053
+  (0.1ms) begin transaction
13054
+ Addresses::Zipcode Load (0.1ms) SELECT "addresses_zipcodes".* FROM "addresses_zipcodes" WHERE "addresses_zipcodes"."number" = ? LIMIT ? [["number", "05012010"], ["LIMIT", 1]]
13055
+ Addresses::State Load (0.0ms) SELECT "addresses_states".* FROM "addresses_states" WHERE "addresses_states"."acronym" = ? LIMIT ? [["acronym", "SP"], ["LIMIT", 1]]
13056
+  (0.1ms) SAVEPOINT active_record_1
13057
+ SQL (0.2ms) INSERT INTO "addresses_states" ("acronym", "created_at", "updated_at") VALUES (?, ?, ?) [["acronym", "SP"], ["created_at", 2016-09-22 21:21:31 UTC], ["updated_at", 2016-09-22 21:21:31 UTC]]
13058
+  (0.1ms) RELEASE SAVEPOINT active_record_1
13059
+ Addresses::City Load (0.0ms) SELECT "addresses_cities".* FROM "addresses_cities" WHERE "addresses_cities"."name" = ? AND "addresses_cities"."state_id" = ? LIMIT ? [["name", "São Paulo"], ["state_id", 1], ["LIMIT", 1]]
13060
+  (0.1ms) SAVEPOINT active_record_1
13061
+ SQL (0.3ms) INSERT INTO "addresses_cities" ("name", "state_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "São Paulo"], ["state_id", 1], ["created_at", 2016-09-22 21:21:31 UTC], ["updated_at", 2016-09-22 21:21:31 UTC]]
13062
+  (0.1ms) RELEASE SAVEPOINT active_record_1
13063
+ Addresses::Neighborhood Load (0.0ms) SELECT "addresses_neighborhoods".* FROM "addresses_neighborhoods" WHERE "addresses_neighborhoods"."name" = ? AND "addresses_neighborhoods"."city_id" = ? LIMIT ? [["name", "Vila Pompeia"], ["city_id", 1], ["LIMIT", 1]]
13064
+  (0.0ms) SAVEPOINT active_record_1
13065
+ SQL (0.1ms) INSERT INTO "addresses_neighborhoods" ("city_id", "name", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["city_id", 1], ["name", "Vila Pompeia"], ["created_at", 2016-09-22 21:21:31 UTC], ["updated_at", 2016-09-22 21:21:31 UTC]]
13066
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13067
+  (0.0ms) SAVEPOINT active_record_1
13068
+ Addresses::State Load (0.0ms) SELECT "addresses_states".* FROM "addresses_states" WHERE "addresses_states"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
13069
+ SQL (0.1ms) INSERT INTO "addresses_zipcodes" ("street", "city_id", "neighborhood_id", "number", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["street", "Rua Ministro Gastão Mesquita"], ["city_id", 1], ["neighborhood_id", 1], ["number", "05012010"], ["created_at", 2016-09-22 21:21:31 UTC], ["updated_at", 2016-09-22 21:21:31 UTC]]
13070
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13071
+  (1.1ms) rollback transaction
13072
+  (0.1ms) begin transaction
13073
+ Addresses::Zipcode Load (0.1ms) SELECT "addresses_zipcodes".* FROM "addresses_zipcodes" WHERE "addresses_zipcodes"."number" = ? LIMIT ? [["number", "05012010"], ["LIMIT", 1]]
13074
+ Addresses::State Load (0.0ms) SELECT "addresses_states".* FROM "addresses_states" WHERE "addresses_states"."acronym" = ? LIMIT ? [["acronym", "SP"], ["LIMIT", 1]]
13075
+  (0.1ms) SAVEPOINT active_record_1
13076
+ SQL (0.2ms) INSERT INTO "addresses_states" ("acronym", "created_at", "updated_at") VALUES (?, ?, ?) [["acronym", "SP"], ["created_at", 2016-09-22 21:21:31 UTC], ["updated_at", 2016-09-22 21:21:31 UTC]]
13077
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13078
+ Addresses::City Load (0.0ms) SELECT "addresses_cities".* FROM "addresses_cities" WHERE "addresses_cities"."name" = ? AND "addresses_cities"."state_id" = ? LIMIT ? [["name", "São Paulo"], ["state_id", 1], ["LIMIT", 1]]
13079
+  (0.0ms) SAVEPOINT active_record_1
13080
+ SQL (0.3ms) INSERT INTO "addresses_cities" ("name", "state_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "São Paulo"], ["state_id", 1], ["created_at", 2016-09-22 21:21:31 UTC], ["updated_at", 2016-09-22 21:21:31 UTC]]
13081
+  (0.1ms) RELEASE SAVEPOINT active_record_1
13082
+ Addresses::Neighborhood Load (0.0ms) SELECT "addresses_neighborhoods".* FROM "addresses_neighborhoods" WHERE "addresses_neighborhoods"."name" = ? AND "addresses_neighborhoods"."city_id" = ? LIMIT ? [["name", "Vila Pompeia"], ["city_id", 1], ["LIMIT", 1]]
13083
+  (0.0ms) SAVEPOINT active_record_1
13084
+ SQL (0.1ms) INSERT INTO "addresses_neighborhoods" ("city_id", "name", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["city_id", 1], ["name", "Vila Pompeia"], ["created_at", 2016-09-22 21:21:31 UTC], ["updated_at", 2016-09-22 21:21:31 UTC]]
13085
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13086
+  (0.0ms) SAVEPOINT active_record_1
13087
+ Addresses::State Load (0.0ms) SELECT "addresses_states".* FROM "addresses_states" WHERE "addresses_states"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
13088
+ SQL (0.1ms) INSERT INTO "addresses_zipcodes" ("street", "city_id", "neighborhood_id", "number", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["street", "Rua Ministro Gastão Mesquita"], ["city_id", 1], ["neighborhood_id", 1], ["number", "05012010"], ["created_at", 2016-09-22 21:21:31 UTC], ["updated_at", 2016-09-22 21:21:31 UTC]]
13089
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13090
+  (1.0ms) rollback transaction
13091
+  (0.1ms) begin transaction
13092
+ Addresses::Zipcode Load (0.1ms) SELECT "addresses_zipcodes".* FROM "addresses_zipcodes" WHERE "addresses_zipcodes"."number" = ? LIMIT ? [["number", "99999999"], ["LIMIT", 1]]
13093
+  (0.1ms) rollback transaction
13094
+  (0.1ms) begin transaction
13095
+  (0.1ms) SAVEPOINT active_record_1
13096
+ SQL (0.3ms) INSERT INTO "addresses_countries" ("name", "acronym", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "Country name"], ["acronym", "Country acronym"], ["created_at", 2016-09-22 21:21:31 UTC], ["updated_at", 2016-09-22 21:21:31 UTC]]
13097
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13098
+  (0.0ms) SAVEPOINT active_record_1
13099
+ SQL (0.3ms) INSERT INTO "addresses_states" ("name", "acronym", "country_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "State name"], ["acronym", "State acronym"], ["country_id", 1], ["created_at", 2016-09-22 21:21:31 UTC], ["updated_at", 2016-09-22 21:21:31 UTC]]
13100
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13101
+  (0.1ms) SAVEPOINT active_record_1
13102
+ SQL (0.1ms) INSERT INTO "addresses_cities" ("name", "state_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "City name"], ["state_id", 1], ["created_at", 2016-09-22 21:21:31 UTC], ["updated_at", 2016-09-22 21:21:31 UTC]]
13103
+  (0.1ms) RELEASE SAVEPOINT active_record_1
13104
+  (0.0ms) SAVEPOINT active_record_1
13105
+ SQL (0.1ms) INSERT INTO "addresses_countries" ("name", "acronym", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "Country name"], ["acronym", "Country acronym"], ["created_at", 2016-09-22 21:21:31 UTC], ["updated_at", 2016-09-22 21:21:31 UTC]]
13106
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13107
+  (0.0ms) SAVEPOINT active_record_1
13108
+ SQL (0.2ms) INSERT INTO "addresses_states" ("name", "acronym", "country_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "State name"], ["acronym", "State acronym"], ["country_id", 2], ["created_at", 2016-09-22 21:21:31 UTC], ["updated_at", 2016-09-22 21:21:31 UTC]]
13109
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13110
+  (0.0ms) SAVEPOINT active_record_1
13111
+ SQL (0.1ms) INSERT INTO "addresses_cities" ("name", "state_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "City name"], ["state_id", 2], ["created_at", 2016-09-22 21:21:31 UTC], ["updated_at", 2016-09-22 21:21:31 UTC]]
13112
+  (0.1ms) RELEASE SAVEPOINT active_record_1
13113
+  (0.0ms) SAVEPOINT active_record_1
13114
+ SQL (0.1ms) INSERT INTO "addresses_neighborhoods" ("city_id", "name", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["city_id", 2], ["name", "Neighborhood name"], ["created_at", 2016-09-22 21:21:31 UTC], ["updated_at", 2016-09-22 21:21:31 UTC]]
13115
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13116
+  (0.0ms) SAVEPOINT active_record_1
13117
+ SQL (0.1ms) INSERT INTO "addresses_zipcodes" ("street", "city_id", "neighborhood_id", "number", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["street", "Street name"], ["city_id", 1], ["neighborhood_id", 1], ["number", "12345678"], ["created_at", 2016-09-22 21:21:31 UTC], ["updated_at", 2016-09-22 21:21:31 UTC]]
13118
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13119
+ Addresses::Zipcode Load (0.0ms) SELECT "addresses_zipcodes".* FROM "addresses_zipcodes" WHERE "addresses_zipcodes"."number" = ? LIMIT ? [["number", "12345678"], ["LIMIT", 1]]
13120
+ Addresses::City Load (0.1ms) SELECT "addresses_cities".* FROM "addresses_cities" WHERE "addresses_cities"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
13121
+ Addresses::State Load (0.0ms) SELECT "addresses_states".* FROM "addresses_states" WHERE "addresses_states"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
13122
+  (1.1ms) rollback transaction
13123
+  (0.0ms) begin transaction
13124
+  (0.1ms) SAVEPOINT active_record_1
13125
+ SQL (0.3ms) INSERT INTO "addresses_countries" ("name", "acronym", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "Country name"], ["acronym", "Country acronym"], ["created_at", 2016-09-22 21:21:31 UTC], ["updated_at", 2016-09-22 21:21:31 UTC]]
13126
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13127
+  (0.0ms) SAVEPOINT active_record_1
13128
+ SQL (0.3ms) INSERT INTO "addresses_states" ("name", "acronym", "country_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "State name"], ["acronym", "State acronym"], ["country_id", 1], ["created_at", 2016-09-22 21:21:31 UTC], ["updated_at", 2016-09-22 21:21:31 UTC]]
13129
+  (0.1ms) RELEASE SAVEPOINT active_record_1
13130
+  (0.1ms) SAVEPOINT active_record_1
13131
+ SQL (0.1ms) INSERT INTO "addresses_cities" ("name", "state_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "City name"], ["state_id", 1], ["created_at", 2016-09-22 21:21:31 UTC], ["updated_at", 2016-09-22 21:21:31 UTC]]
13132
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13133
+ Started GET "/addresses/cities?state_id=1&format=json" for 127.0.0.1 at 2016-09-22 18:21:31 -0300
13134
+ Processing by Addresses::CitiesController#index as JSON
13135
+ Parameters: {"state_id"=>"1"}
13136
+ Addresses::State Load (0.1ms) SELECT "addresses_states".* FROM "addresses_states" WHERE "addresses_states"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
13137
+ Addresses::City Load (0.1ms) SELECT "addresses_cities".* FROM "addresses_cities" WHERE "addresses_cities"."state_id" = ? ORDER BY name asc [["state_id", 1]]
13138
+ Completed 200 OK in 3ms (Views: 1.0ms | ActiveRecord: 0.2ms)
13139
+  (0.9ms) rollback transaction
13140
+  (0.1ms) begin transaction
13141
+  (0.0ms) rollback transaction
13142
+  (0.1ms) begin transaction
13143
+  (0.1ms) rollback transaction
13144
+  (0.1ms) begin transaction
13145
+  (0.1ms) rollback transaction
13146
+  (0.1ms) begin transaction
13147
+  (0.0ms) rollback transaction
13148
+  (0.1ms) begin transaction
13149
+  (0.1ms) rollback transaction
13150
+  (0.1ms) begin transaction
13151
+  (0.1ms) rollback transaction
13152
+  (0.0ms) begin transaction
13153
+  (0.1ms) rollback transaction
13154
+  (0.1ms) begin transaction
13155
+  (0.1ms) rollback transaction
13156
+  (0.1ms) begin transaction
13157
+  (0.1ms) rollback transaction
13158
+  (0.1ms) begin transaction
13159
+  (0.1ms) rollback transaction
13160
+  (0.1ms) begin transaction
13161
+  (0.1ms) SAVEPOINT active_record_1
13162
+ SQL (0.3ms) INSERT INTO "addresses_countries" ("name", "acronym", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "Country name"], ["acronym", "Country acronym"], ["created_at", 2016-09-22 21:21:31 UTC], ["updated_at", 2016-09-22 21:21:31 UTC]]
13163
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13164
+  (0.0ms) SAVEPOINT active_record_1
13165
+ SQL (0.3ms) INSERT INTO "addresses_states" ("name", "acronym", "country_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "State name"], ["acronym", "State acronym"], ["country_id", 1], ["created_at", 2016-09-22 21:21:31 UTC], ["updated_at", 2016-09-22 21:21:31 UTC]]
13166
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13167
+  (0.1ms) SAVEPOINT active_record_1
13168
+ SQL (0.1ms) INSERT INTO "addresses_cities" ("name", "state_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "City name"], ["state_id", 1], ["created_at", 2016-09-22 21:21:31 UTC], ["updated_at", 2016-09-22 21:21:31 UTC]]
13169
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13170
+  (0.0ms) SAVEPOINT active_record_1
13171
+ SQL (0.1ms) INSERT INTO "addresses_neighborhoods" ("city_id", "name", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["city_id", 1], ["name", "Neighborhood name"], ["created_at", 2016-09-22 21:21:31 UTC], ["updated_at", 2016-09-22 21:21:31 UTC]]
13172
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13173
+  (0.0ms) SAVEPOINT active_record_1
13174
+ SQL (0.1ms) INSERT INTO "addresses_zipcodes" ("street", "city_id", "neighborhood_id", "number", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["street", "Street name"], ["city_id", 1], ["neighborhood_id", 1], ["number", "05012010"], ["created_at", 2016-09-22 21:21:31 UTC], ["updated_at", 2016-09-22 21:21:31 UTC]]
13175
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13176
+ Processing by Addresses::ZipcodesController#show as JSON
13177
+ Parameters: {"zipcode"=>"99999999"}
13178
+ Addresses::Zipcode Load (0.0ms) SELECT "addresses_zipcodes".* FROM "addresses_zipcodes" WHERE "addresses_zipcodes"."number" = ? LIMIT ? [["number", "99999999"], ["LIMIT", 1]]
13179
+ Completed 422 Unprocessable Entity in 5ms (Views: 0.2ms | ActiveRecord: 0.0ms)
13180
+  (1.0ms) rollback transaction
13181
+  (0.1ms) begin transaction
13182
+  (0.1ms) SAVEPOINT active_record_1
13183
+ SQL (0.2ms) INSERT INTO "addresses_countries" ("name", "acronym", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "Country name"], ["acronym", "Country acronym"], ["created_at", 2016-09-22 21:21:31 UTC], ["updated_at", 2016-09-22 21:21:31 UTC]]
13184
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13185
+  (0.0ms) SAVEPOINT active_record_1
13186
+ SQL (0.3ms) INSERT INTO "addresses_states" ("name", "acronym", "country_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "State name"], ["acronym", "State acronym"], ["country_id", 1], ["created_at", 2016-09-22 21:21:31 UTC], ["updated_at", 2016-09-22 21:21:31 UTC]]
13187
+  (0.1ms) RELEASE SAVEPOINT active_record_1
13188
+  (0.0ms) SAVEPOINT active_record_1
13189
+ SQL (0.1ms) INSERT INTO "addresses_cities" ("name", "state_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "City name"], ["state_id", 1], ["created_at", 2016-09-22 21:21:31 UTC], ["updated_at", 2016-09-22 21:21:31 UTC]]
13190
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13191
+  (0.0ms) SAVEPOINT active_record_1
13192
+ SQL (0.1ms) INSERT INTO "addresses_neighborhoods" ("city_id", "name", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["city_id", 1], ["name", "Neighborhood name"], ["created_at", 2016-09-22 21:21:31 UTC], ["updated_at", 2016-09-22 21:21:31 UTC]]
13193
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13194
+  (0.1ms) SAVEPOINT active_record_1
13195
+ SQL (0.2ms) INSERT INTO "addresses_zipcodes" ("street", "city_id", "neighborhood_id", "number", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["street", "Street name"], ["city_id", 1], ["neighborhood_id", 1], ["number", "05012010"], ["created_at", 2016-09-22 21:21:31 UTC], ["updated_at", 2016-09-22 21:21:31 UTC]]
13196
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13197
+ Processing by Addresses::ZipcodesController#show as JSON
13198
+ Parameters: {"zipcode"=>"05012010"}
13199
+ Addresses::Zipcode Load (0.1ms) SELECT "addresses_zipcodes".* FROM "addresses_zipcodes" WHERE "addresses_zipcodes"."number" = ? LIMIT ? [["number", "05012010"], ["LIMIT", 1]]
13200
+ Addresses::City Load (0.0ms) SELECT "addresses_cities".* FROM "addresses_cities" WHERE "addresses_cities"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
13201
+ Addresses::State Load (0.0ms) SELECT "addresses_states".* FROM "addresses_states" WHERE "addresses_states"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
13202
+ Completed 200 OK in 3ms (Views: 0.5ms | ActiveRecord: 0.1ms)
13203
+  (1.2ms) rollback transaction
13204
+  (0.1ms) begin transaction
13205
+  (0.0ms) SAVEPOINT active_record_1
13206
+ SQL (0.2ms) INSERT INTO "addresses_countries" ("name", "acronym", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "Country name"], ["acronym", "Country acronym"], ["created_at", 2016-09-22 21:21:31 UTC], ["updated_at", 2016-09-22 21:21:31 UTC]]
13207
+  (0.1ms) RELEASE SAVEPOINT active_record_1
13208
+  (0.0ms) SAVEPOINT active_record_1
13209
+ SQL (0.3ms) INSERT INTO "addresses_states" ("name", "acronym", "country_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "State name"], ["acronym", "State acronym"], ["country_id", 1], ["created_at", 2016-09-22 21:21:31 UTC], ["updated_at", 2016-09-22 21:21:31 UTC]]
13210
+  (0.1ms) RELEASE SAVEPOINT active_record_1
13211
+  (0.0ms) SAVEPOINT active_record_1
13212
+ SQL (0.1ms) INSERT INTO "addresses_cities" ("name", "state_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "City name"], ["state_id", 1], ["created_at", 2016-09-22 21:21:31 UTC], ["updated_at", 2016-09-22 21:21:31 UTC]]
13213
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13214
+  (0.0ms) SAVEPOINT active_record_1
13215
+ SQL (0.1ms) INSERT INTO "addresses_neighborhoods" ("city_id", "name", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["city_id", 1], ["name", "Neighborhood name"], ["created_at", 2016-09-22 21:21:31 UTC], ["updated_at", 2016-09-22 21:21:31 UTC]]
13216
+  (0.1ms) RELEASE SAVEPOINT active_record_1
13217
+  (0.1ms) SAVEPOINT active_record_1
13218
+ SQL (0.2ms) INSERT INTO "addresses_zipcodes" ("street", "city_id", "neighborhood_id", "number", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["street", "Street name"], ["city_id", 1], ["neighborhood_id", 1], ["number", "05012010"], ["created_at", 2016-09-22 21:21:31 UTC], ["updated_at", 2016-09-22 21:21:31 UTC]]
13219
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13220
+ Processing by Addresses::ZipcodesController#show as JSON
13221
+ Parameters: {"zipcode"=>"05012010"}
13222
+ Addresses::Zipcode Load (0.0ms) SELECT "addresses_zipcodes".* FROM "addresses_zipcodes" WHERE "addresses_zipcodes"."number" = ? LIMIT ? [["number", "05012010"], ["LIMIT", 1]]
13223
+ Addresses::City Load (0.0ms) SELECT "addresses_cities".* FROM "addresses_cities" WHERE "addresses_cities"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
13224
+ Addresses::State Load (0.0ms) SELECT "addresses_states".* FROM "addresses_states" WHERE "addresses_states"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
13225
+ Completed 200 OK in 3ms (Views: 0.5ms | ActiveRecord: 0.1ms)
13226
+  (1.9ms) rollback transaction
13227
+  (0.1ms) begin transaction
13228
+  (0.1ms) rollback transaction
13229
+  (0.1ms) begin transaction
13230
+  (0.1ms) rollback transaction
13231
+  (0.1ms) begin transaction
13232
+  (0.1ms) SAVEPOINT active_record_1
13233
+ SQL (0.3ms) INSERT INTO "addresses_countries" ("name", "acronym", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "Country name"], ["acronym", "Country acronym"], ["created_at", 2016-09-22 21:21:31 UTC], ["updated_at", 2016-09-22 21:21:31 UTC]]
13234
+  (0.1ms) RELEASE SAVEPOINT active_record_1
13235
+  (0.1ms) SAVEPOINT active_record_1
13236
+ SQL (0.3ms) INSERT INTO "addresses_states" ("name", "acronym", "country_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "State name"], ["acronym", "State acronym"], ["country_id", 1], ["created_at", 2016-09-22 21:21:31 UTC], ["updated_at", 2016-09-22 21:21:31 UTC]]
13237
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13238
+  (0.1ms) SAVEPOINT active_record_1
13239
+ SQL (0.1ms) INSERT INTO "addresses_cities" ("name", "state_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "City name"], ["state_id", 1], ["created_at", 2016-09-22 21:21:31 UTC], ["updated_at", 2016-09-22 21:21:31 UTC]]
13240
+  (0.1ms) RELEASE SAVEPOINT active_record_1
13241
+  (0.0ms) SAVEPOINT active_record_1
13242
+ SQL (0.1ms) INSERT INTO "addresses_neighborhoods" ("city_id", "name", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["city_id", 1], ["name", "Neighborhood name"], ["created_at", 2016-09-22 21:21:31 UTC], ["updated_at", 2016-09-22 21:21:31 UTC]]
13243
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13244
+  (0.0ms) SAVEPOINT active_record_1
13245
+ SQL (0.1ms) INSERT INTO "addresses_zipcodes" ("street", "city_id", "neighborhood_id", "number", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["street", "Street name"], ["city_id", 1], ["neighborhood_id", 1], ["number", "05012010"], ["created_at", 2016-09-22 21:21:31 UTC], ["updated_at", 2016-09-22 21:21:31 UTC]]
13246
+  (0.1ms) RELEASE SAVEPOINT active_record_1
13247
+ Started GET "/addresses/zipcodes/05012010?format=json" for 127.0.0.1 at 2016-09-22 18:21:31 -0300
13248
+ Processing by Addresses::ZipcodesController#show as JSON
13249
+ Parameters: {"zipcode"=>"05012010"}
13250
+ Addresses::Zipcode Load (0.0ms) SELECT "addresses_zipcodes".* FROM "addresses_zipcodes" WHERE "addresses_zipcodes"."number" = ? LIMIT ? [["number", "05012010"], ["LIMIT", 1]]
13251
+ Addresses::City Load (0.0ms) SELECT "addresses_cities".* FROM "addresses_cities" WHERE "addresses_cities"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
13252
+ Addresses::State Load (0.0ms) SELECT "addresses_states".* FROM "addresses_states" WHERE "addresses_states"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
13253
+ Completed 200 OK in 3ms (Views: 0.5ms | ActiveRecord: 0.1ms)
13254
+  (1.1ms) rollback transaction
13255
+  (0.1ms) begin transaction
13256
+  (0.1ms) SAVEPOINT active_record_1
13257
+ SQL (0.3ms) INSERT INTO "addresses_countries" ("name", "acronym", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "Country name"], ["acronym", "Country acronym"], ["created_at", 2016-09-22 21:21:31 UTC], ["updated_at", 2016-09-22 21:21:31 UTC]]
13258
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13259
+  (0.0ms) SAVEPOINT active_record_1
13260
+ SQL (0.3ms) INSERT INTO "addresses_states" ("name", "acronym", "country_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "State name"], ["acronym", "State acronym"], ["country_id", 1], ["created_at", 2016-09-22 21:21:31 UTC], ["updated_at", 2016-09-22 21:21:31 UTC]]
13261
+  (0.1ms) RELEASE SAVEPOINT active_record_1
13262
+  (0.0ms) SAVEPOINT active_record_1
13263
+ SQL (0.1ms) INSERT INTO "addresses_cities" ("name", "state_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "City name"], ["state_id", 1], ["created_at", 2016-09-22 21:21:31 UTC], ["updated_at", 2016-09-22 21:21:31 UTC]]
13264
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13265
+  (0.1ms) SAVEPOINT active_record_1
13266
+ SQL (0.1ms) INSERT INTO "addresses_neighborhoods" ("city_id", "name", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["city_id", 1], ["name", "Neighborhood name"], ["created_at", 2016-09-22 21:21:31 UTC], ["updated_at", 2016-09-22 21:21:31 UTC]]
13267
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13268
+ Started GET "/addresses/neighborhoods?city_id=1&format=json" for 127.0.0.1 at 2016-09-22 18:21:31 -0300
13269
+ Processing by Addresses::NeighborhoodsController#index as JSON
13270
+ Parameters: {"city_id"=>"1"}
13271
+ Addresses::City Load (0.1ms) SELECT "addresses_cities".* FROM "addresses_cities" WHERE "addresses_cities"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
13272
+ Addresses::Neighborhood Load (0.1ms) SELECT "addresses_neighborhoods".* FROM "addresses_neighborhoods" WHERE "addresses_neighborhoods"."city_id" = ? ORDER BY name asc [["city_id", 1]]
13273
+ Completed 200 OK in 3ms (Views: 0.9ms | ActiveRecord: 0.2ms)
13274
+  (1.0ms) rollback transaction
13275
+  (0.1ms) begin transaction
13276
+  (0.1ms) SAVEPOINT active_record_1
13277
+ SQL (0.3ms) INSERT INTO "addresses_countries" ("name", "acronym", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "Country name"], ["acronym", "Country acronym"], ["created_at", 2016-09-22 21:21:31 UTC], ["updated_at", 2016-09-22 21:21:31 UTC]]
13278
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13279
+  (0.1ms) SAVEPOINT active_record_1
13280
+ SQL (0.3ms) INSERT INTO "addresses_states" ("name", "acronym", "country_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "State name"], ["acronym", "State acronym"], ["country_id", 1], ["created_at", 2016-09-22 21:21:31 UTC], ["updated_at", 2016-09-22 21:21:31 UTC]]
13281
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13282
+  (0.0ms) SAVEPOINT active_record_1
13283
+ SQL (0.1ms) INSERT INTO "addresses_cities" ("name", "state_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "City name"], ["state_id", 1], ["created_at", 2016-09-22 21:21:31 UTC], ["updated_at", 2016-09-22 21:21:31 UTC]]
13284
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13285
+ Processing by Addresses::CitiesController#index as JSON
13286
+ Parameters: {"state_id"=>"1"}
13287
+ Addresses::State Load (0.1ms) SELECT "addresses_states".* FROM "addresses_states" WHERE "addresses_states"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
13288
+ Addresses::City Load (0.1ms) SELECT "addresses_cities".* FROM "addresses_cities" WHERE "addresses_cities"."state_id" = ? ORDER BY name asc [["state_id", 1]]
13289
+ Completed 200 OK in 3ms (Views: 1.0ms | ActiveRecord: 0.2ms)
13290
+  (1.0ms) rollback transaction
13291
+  (0.1ms) begin transaction
13292
+  (0.1ms) SAVEPOINT active_record_1
13293
+ SQL (0.2ms) INSERT INTO "addresses_countries" ("name", "acronym", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "Country name"], ["acronym", "Country acronym"], ["created_at", 2016-09-22 21:21:31 UTC], ["updated_at", 2016-09-22 21:21:31 UTC]]
13294
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13295
+  (0.0ms) SAVEPOINT active_record_1
13296
+ SQL (0.3ms) INSERT INTO "addresses_states" ("name", "acronym", "country_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "State name"], ["acronym", "State acronym"], ["country_id", 1], ["created_at", 2016-09-22 21:21:31 UTC], ["updated_at", 2016-09-22 21:21:31 UTC]]
13297
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13298
+  (0.1ms) SAVEPOINT active_record_1
13299
+ SQL (0.1ms) INSERT INTO "addresses_cities" ("name", "state_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "City name"], ["state_id", 1], ["created_at", 2016-09-22 21:21:31 UTC], ["updated_at", 2016-09-22 21:21:31 UTC]]
13300
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13301
+ Processing by Addresses::CitiesController#index as JSON
13302
+ Parameters: {"state_id"=>"1"}
13303
+ Addresses::State Load (0.0ms) SELECT "addresses_states".* FROM "addresses_states" WHERE "addresses_states"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
13304
+ Addresses::City Load (0.1ms) SELECT "addresses_cities".* FROM "addresses_cities" WHERE "addresses_cities"."state_id" = ? ORDER BY name asc [["state_id", 1]]
13305
+ Completed 200 OK in 2ms (Views: 0.8ms | ActiveRecord: 0.2ms)
13306
+  (0.8ms) rollback transaction
13307
+  (0.1ms) begin transaction
13308
+  (0.1ms) rollback transaction
13309
+  (0.1ms) begin transaction
13310
+  (0.1ms) rollback transaction
13311
+  (0.0ms) begin transaction
13312
+  (0.1ms) rollback transaction
13313
+  (0.1ms) begin transaction
13314
+  (0.1ms) rollback transaction
13315
+  (0.0ms) begin transaction
13316
+  (0.0ms) SAVEPOINT active_record_1
13317
+ SQL (0.3ms) INSERT INTO "addresses_countries" ("name", "acronym", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "Country name"], ["acronym", "Country acronym"], ["created_at", 2016-09-22 21:21:32 UTC], ["updated_at", 2016-09-22 21:21:32 UTC]]
13318
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13319
+  (0.0ms) SAVEPOINT active_record_1
13320
+ SQL (0.3ms) INSERT INTO "addresses_states" ("name", "acronym", "country_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "State name"], ["acronym", "State acronym"], ["country_id", 1], ["created_at", 2016-09-22 21:21:32 UTC], ["updated_at", 2016-09-22 21:21:32 UTC]]
13321
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13322
+  (0.0ms) SAVEPOINT active_record_1
13323
+ SQL (0.1ms) INSERT INTO "addresses_cities" ("name", "state_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "City name"], ["state_id", 1], ["created_at", 2016-09-22 21:21:32 UTC], ["updated_at", 2016-09-22 21:21:32 UTC]]
13324
+  (0.1ms) RELEASE SAVEPOINT active_record_1
13325
+  (0.0ms) SAVEPOINT active_record_1
13326
+ SQL (0.1ms) INSERT INTO "addresses_countries" ("name", "acronym", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "Country name"], ["acronym", "Country acronym"], ["created_at", 2016-09-22 21:21:32 UTC], ["updated_at", 2016-09-22 21:21:32 UTC]]
13327
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13328
+  (0.1ms) SAVEPOINT active_record_1
13329
+ SQL (0.1ms) INSERT INTO "addresses_states" ("name", "acronym", "country_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "State name"], ["acronym", "State acronym"], ["country_id", 2], ["created_at", 2016-09-22 21:21:32 UTC], ["updated_at", 2016-09-22 21:21:32 UTC]]
13330
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13331
+  (0.0ms) SAVEPOINT active_record_1
13332
+ SQL (0.1ms) INSERT INTO "addresses_cities" ("name", "state_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "City name"], ["state_id", 2], ["created_at", 2016-09-22 21:21:32 UTC], ["updated_at", 2016-09-22 21:21:32 UTC]]
13333
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13334
+  (0.0ms) SAVEPOINT active_record_1
13335
+ SQL (0.1ms) INSERT INTO "addresses_neighborhoods" ("city_id", "name", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["city_id", 2], ["name", "Neighborhood name"], ["created_at", 2016-09-22 21:21:32 UTC], ["updated_at", 2016-09-22 21:21:32 UTC]]
13336
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13337
+  (0.1ms) SAVEPOINT active_record_1
13338
+ SQL (0.2ms) INSERT INTO "addresses_zipcodes" ("street", "city_id", "neighborhood_id", "number", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["street", "Street name"], ["city_id", 1], ["neighborhood_id", 1], ["number", "12345678"], ["created_at", 2016-09-22 21:21:32 UTC], ["updated_at", 2016-09-22 21:21:32 UTC]]
13339
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13340
+  (0.0ms) SAVEPOINT active_record_1
13341
+ SQL (0.2ms) INSERT INTO "addresses_addresses" ("number", "created_at", "updated_at", "zipcode_id") VALUES (?, ?, ?, ?) [["number", "Number"], ["created_at", 2016-09-22 21:21:32 UTC], ["updated_at", 2016-09-22 21:21:32 UTC], ["zipcode_id", 1]]
13342
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13343
+  (1.2ms) rollback transaction
@@ -5,6 +5,7 @@ RSpec.describe Addresses::Zipcode, type: :model do
5
5
  it { is_expected.to validate_presence_of(:number) }
6
6
  it { is_expected.to validate_presence_of(:city_id) }
7
7
  it { is_expected.to validate_presence_of(:state_id) }
8
+ it { is_expected.to validate_presence_of(:street) }
8
9
  end
9
10
 
10
11
  describe 'association' do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: addresses
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wilbert Ribeiro
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-09-21 00:00:00.000000000 Z
12
+ date: 2016-09-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -152,7 +152,6 @@ files:
152
152
  - spec/dummy/public/422.html
153
153
  - spec/dummy/public/500.html
154
154
  - spec/dummy/public/favicon.ico
155
- - spec/dummy/tmp/pids/server.pid
156
155
  - spec/factories/addresses.rb
157
156
  - spec/factories/cities.rb
158
157
  - spec/factories/countries.rb
@@ -255,7 +254,6 @@ test_files:
255
254
  - spec/dummy/public/favicon.ico
256
255
  - spec/dummy/Rakefile
257
256
  - spec/dummy/README.rdoc
258
- - spec/dummy/tmp/pids/server.pid
259
257
  - spec/factories/addresses.rb
260
258
  - spec/factories/cities.rb
261
259
  - spec/factories/countries.rb
@@ -1 +0,0 @@
1
- 4931