Class: Decidim::Lausanne::Budgets::DataPortabilityBudgetsOrderSerializer
- Inherits:
-
Exporters::Serializer
- Object
- Exporters::Serializer
- Decidim::Lausanne::Budgets::DataPortabilityBudgetsOrderSerializer
- Defined in:
- app/serializers/decidim/lausanne/budgets/data_portability_budgets_order_serializer.rb
Instance Method Summary collapse
-
#initialize(order) ⇒ DataPortabilityBudgetsOrderSerializer
constructor
Public: Initializes the serializer with a conversation.
-
#serialize ⇒ Object
Serializes a Debate for data portability.
Constructor Details
#initialize(order) ⇒ DataPortabilityBudgetsOrderSerializer
Public: Initializes the serializer with a conversation.
8 9 10 |
# File 'app/serializers/decidim/lausanne/budgets/data_portability_budgets_order_serializer.rb', line 8 def initialize(order) @order = order end |
Instance Method Details
#serialize ⇒ Object
Serializes a Debate for data portability
13 14 15 16 17 18 19 20 21 22 23 |
# File 'app/serializers/decidim/lausanne/budgets/data_portability_budgets_order_serializer.rb', line 13 def serialize { id: order.id, budget: order.budget.title, component: order.budget.component.name, checked_out_at: order.checked_out_at, projects: all_projects, created_at: order.created_at, updated_at: order.updated_at } end |