Moving to state_name

This commit is contained in:
Will Marshall
2014-07-31 11:11:34 +10:00
parent a26450d173
commit 7ca618fb29

View File

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