-
Notifications
You must be signed in to change notification settings - Fork 9
Service ColumnsBuilder
Vladislav Trotsenko edited this page Sep 30, 2019
·
1 revision
Auxiliary service for performing validation dependencies for filtering/sorting operations. Build collection with Api::V1::Lib::Service::JsonApi::Column
instances.
ctx[:available_columns] = Api::V1::Lib::Service::JsonApi::ColumnsBuilder.call(
[
{ name: :attr_1, filterable: true, sortable: false }, # by default type: :string
{ name: :attr_2, type: :number, filterable: true, sortable: true }
]
)
=>
[
<struct Api::V1::Lib::Service::JsonApi::Column name=:attr_1, type=:string, sortable=false, filterable=true>,
<struct Api::V1::Lib::Service::JsonApi::Column name=:attr_2, type=:number, sortable=true, filterable=true>
]
RubyGarage 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!