From 78a70292ac3604b2f5abeae1307fb13b8a3b5d08 Mon Sep 17 00:00:00 2001 From: Rob H Date: Mon, 8 Sep 2014 15:39:17 +1000 Subject: [PATCH] Moved attributes are actually delcared in the right place for Enterprise Serializer --- app/serializers/api/enterprise_serializer.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/serializers/api/enterprise_serializer.rb b/app/serializers/api/enterprise_serializer.rb index 6485687d2b..c76cffd7d1 100644 --- a/app/serializers/api/enterprise_serializer.rb +++ b/app/serializers/api/enterprise_serializer.rb @@ -17,6 +17,9 @@ end class Api::UncachedEnterpriseSerializer < ActiveModel::Serializer attributes :orders_close_at, :active + #TODO: Remove these later + attributes :icon, :has_shopfront, :can_aggregate + def orders_close_at OrderCycle.first_closing_for(object).andand.orders_close_at end @@ -69,9 +72,8 @@ class Api::CachedEnterpriseSerializer < ActiveModel::Serializer attributes :name, :id, :description, :latitude, :longitude, :long_description, :website, :instagram, :linkedin, :twitter, :facebook, :is_primary_producer, :is_distributor, :phone, :visible, - :email, :hash, :logo, :promo_image, :icon, :path, + :email, :hash, :logo, :promo_image, :path, :pickup, :delivery - attributes :has_shopfront, :can_aggregate has_many :distributed_taxons, key: :taxons, serializer: Api::IdSerializer has_many :supplied_taxons, serializer: Api::IdSerializer