mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-28 21:07:16 +00:00
Moving to state_name
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user