-
Notifications
You must be signed in to change notification settings - Fork 9
Macro::Renderer
Vladislav Trotsenko edited this page Sep 27, 2019
·
1 revision
Provides to render operation result with specified serializer with strict following Jsonapi specification. That means that macros aggregate :inclusion_options and :links from context too.
class SomeOperation < ApplicationOperation
step Macro::Renderer()
endclass SomeOperation < ApplicationOperation
step Macro::Renderer(serializer: SomeSerializer)
endValue for :meta is reference to ctx[key] => meta: :some_meta_data is equal to meta: ctx[:some_meta_data]
class SomeOperation < ApplicationOperation
step Macro::Assign(to: :some_meta_data, value: {})
step Macro::Renderer(serializer: SomeSerializer, meta: :some_meta_data)
endRubyGarage is a leading software development and consulting company in Eastern Europe. Our main expertise includes Ruby and Ruby on Rails, but we successfully employ other technologies to deliver the best results to our clients. Check out our portfolio for even more exciting works!
