From 7ca618fb2925ff33fdf1a13dc4fdb776a8023b19 Mon Sep 17 00:00:00 2001 From: Will Marshall Date: Thu, 31 Jul 2014 11:11:34 +1000 Subject: [PATCH] Moving to state_name --- app/serializers/api/address_serializer.rb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app/serializers/api/address_serializer.rb b/app/serializers/api/address_serializer.rb index 18483da312..66e4267e1f 100644 --- a/app/serializers/api/address_serializer.rb +++ b/app/serializers/api/address_serializer.rb @@ -1,10 +1,12 @@ class Api::AddressSerializer < ActiveModel::Serializer - cached - delegate :cache_key, to: :object + #cached + #delegate :cache_key, to: :object - attributes :id, :zipcode, :city, :state, :state_id + attributes :id, :zipcode, :city, :state_name, :state_id, + :phone, :firstname, :lastname, :address1, :address2, :city, :country_id, + :zipcode - def state + def state_name object.state.andand.abbr end end