Module: SimpleJsonApi
- Defined in:
- lib/simple_json_api.rb,
lib/simple_json_api/dsl.rb,
lib/simple_json_api/version.rb,
lib/simple_json_api/attribute.rb,
lib/simple_json_api/field_list.rb,
lib/simple_json_api/serializer.rb,
lib/simple_json_api/association.rb,
lib/simple_json_api/include_list.rb,
lib/simple_json_api/array_serializer.rb,
lib/simple_json_api/json_api_builder.rb,
lib/simple_json_api/array_refinements.rb,
lib/simple_json_api/resource_serializer.rb,
lib/simple_json_api/active_record_refinements.rb
Overview
SimpleJsonApi
Defined Under Namespace
Modules: ActiveRecordRefinements, ArrayRefinements, DSL Classes: ArraySerializer, Association, Attribute, FieldList, IncludeList, JsonApiBuilder, ResourceSerializer, Serializer
Constant Summary collapse
- VERSION =
'0.0.2'
Class Method Summary collapse
-
.render(model:, serializer:, options: {}) ⇒ Object
Main hook to generate json.
Class Method Details
.render(model:, serializer:, options: {}) ⇒ Object
Main hook to generate json
20 21 22 23 24 25 26 |
# File 'lib/simple_json_api.rb', line 20 def self.render(model:, serializer:, options: {}) JsonApiBuilder.new( model: model, serializer: serializer, options: ).to_json end |