From e8045cac42519bfae68b6dc78ebff21908465a11 Mon Sep 17 00:00:00 2001 From: Will Marshall Date: Wed, 30 Jul 2014 17:09:31 +1000 Subject: [PATCH] Renaming to state_name --- app/serializers/api/address_serializer.rb | 2 +- app/views/home/_fat.html.haml | 17 ----------------- app/views/home/_skinny.html.haml | 2 +- app/views/json/partials/_address.rabl | 2 +- app/views/modals/_producer.html.haml | 2 +- app/views/producers/_fat.html.haml | 2 +- app/views/producers/_skinny.html.haml | 4 ++-- 7 files changed, 7 insertions(+), 24 deletions(-) diff --git a/app/serializers/api/address_serializer.rb b/app/serializers/api/address_serializer.rb index e121cfde38..18483da312 100644 --- a/app/serializers/api/address_serializer.rb +++ b/app/serializers/api/address_serializer.rb @@ -2,7 +2,7 @@ class Api::AddressSerializer < ActiveModel::Serializer cached delegate :cache_key, to: :object - attributes :id, :zipcode, :city, :state + attributes :id, :zipcode, :city, :state, :state_id def state object.state.andand.abbr diff --git a/app/views/home/_fat.html.haml b/app/views/home/_fat.html.haml index 37b4194e26..f3f74cb282 100644 --- a/app/views/home/_fat.html.haml +++ b/app/views/home/_fat.html.haml @@ -29,20 +29,3 @@ {{ enterprise.name }} %div{"bo-if" => "!hub.producers"}   - -/ .row.active_table_row.link{"ng-show" => "open()"} -/ .cta-container.columns.small-12 -/ .row -/ .columns.small-12 -/ %h5 -/ %span{"active-table-hub-link" => "hub", change: "Change hub to", shop: "Shop at"} -/ .row -/ .columns.small-12 -/ %a.button.hub{"bo-href" => "hub.path", -/ "ng-class" => "{primary: hub.active, secondary: !hub.active}", -/ "ofn-empties-cart" => "hub"} -/ %i.ofn-i_033-open-sign{"bo-if" => "hub.active"} -/ %i.ofn-i_032-closed-sign{"bo-if" => "!hub.active"} -/ {{hub.name}} -/ .button-address {{ [hub.address.city, hub.address.state] | printArray }} -/ %i.ofn-i_007-caret-right diff --git a/app/views/home/_skinny.html.haml b/app/views/home/_skinny.html.haml index dad391a287..2b59132999 100644 --- a/app/views/home/_skinny.html.haml +++ b/app/views/home/_skinny.html.haml @@ -7,7 +7,7 @@ .columns.small-4.medium-2.large-2 {{ hub.address.city }} .columns.small-2.medium-1.large-1 - {{ hub.address.state | uppercase }} + {{ hub.address.state_name | uppercase }} .columns.small-6.medium-3.large-4.text-right{"bo-if" => "hub.active"} %a.hub{"bo-href" => "hub.path", "ng-class" => "{primary: hub.active, secondary: !hub.active}", "ofn-empties-cart" => "hub"} diff --git a/app/views/json/partials/_address.rabl b/app/views/json/partials/_address.rabl index 04cc456a29..8f77f83d99 100644 --- a/app/views/json/partials/_address.rabl +++ b/app/views/json/partials/_address.rabl @@ -1,4 +1,4 @@ attributes :city, :zipcode, :phone -node :state do |address| +node :state_name do |address| address.state.abbr end diff --git a/app/views/modals/_producer.html.haml b/app/views/modals/_producer.html.haml index 8fd778b388..5d2d342f6d 100644 --- a/app/views/modals/_producer.html.haml +++ b/app/views/modals/_producer.html.haml @@ -2,7 +2,7 @@ .highlight .highlight-top %p.right - {{ [enterprise.address.city, enterprise.address.state] | printArray}} + {{ [enterprise.address.city, enterprise.address.state_name] | printArray}} %h3 %i.ofn-i_036-producers {{ enterprise.name }} diff --git a/app/views/producers/_fat.html.haml b/app/views/producers/_fat.html.haml index 10cd2f00b5..042e39dba9 100644 --- a/app/views/producers/_fat.html.haml +++ b/app/views/producers/_fat.html.haml @@ -34,5 +34,5 @@ %i.ofn-i_033-open-sign{"bo-if" => "hub.active"} %i.ofn-i_032-closed-sign{"bo-if" => "!hub.active"} {{hub.name}} - .button-address {{ [hub.address.city, hub.address.state] | printArray }} + .button-address {{ [hub.address.city, hub.address.state_name] | printArray }} %i.ofn-i_007-caret-right diff --git a/app/views/producers/_skinny.html.haml b/app/views/producers/_skinny.html.haml index 824d8f2630..e1f26f0304 100644 --- a/app/views/producers/_skinny.html.haml +++ b/app/views/producers/_skinny.html.haml @@ -5,8 +5,8 @@ .columns.small-6.medium-3.large-3 {{ producer.address.city }} .columns.small-4.medium-3.large-4 - {{ producer.address.state | uppercase }} + {{ producer.address.state_name | uppercase }} .columns.small-2.medium-2.large-1.text-right / This forces line-height to be triggered %span   - %i{"ng-class" => "{'ofn-i_005-caret-down' : !open(), 'ofn-i_006-caret-up' : open()}"} \ No newline at end of file + %i{"ng-class" => "{'ofn-i_005-caret-down' : !open(), 'ofn-i_006-caret-up' : open()}"}