Renaming to state_name

This commit is contained in:
Will Marshall
2014-07-30 17:09:31 +10:00
committed by Rohan Mitchell
parent 659462327c
commit e8045cac42
7 changed files with 7 additions and 24 deletions

View File

@@ -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

View File

@@ -29,20 +29,3 @@
{{ enterprise.name }}
%div{"bo-if" => "!hub.producers"}
&nbsp;
/ .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

View File

@@ -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"}

View File

@@ -1,4 +1,4 @@
attributes :city, :zipcode, :phone
node :state do |address|
node :state_name do |address|
address.state.abbr
end

View File

@@ -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 }}

View File

@@ -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

View File

@@ -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 &nbsp;
%i{"ng-class" => "{'ofn-i_005-caret-down' : !open(), 'ofn-i_006-caret-up' : open()}"}
%i{"ng-class" => "{'ofn-i_005-caret-down' : !open(), 'ofn-i_006-caret-up' : open()}"}