Sha256: e0653e60d3f7d9b314805c2c222ac839fa016456f4e8fdabde9a2f92dd013ce4
Contents?: true
Size: 674 Bytes
Versions: 7
Compression:
Stored size: 674 Bytes
Contents
module Ecom module Core class ProjectCrewsController < ApplicationController before_action :set_service, only: %i[update] def index project = Ecom::Core::Project.find(params[:id]) serialized = ActiveModelSerializers::SerializableResource.new(project.crews) render json: { success: true, data: serialized } end def update data = @service.update(params) serialized = ActiveModelSerializers::SerializableResource.new(data[:data]) render json: { success: true, data: serialized } end private def set_service @service = ProjectCrewService.new end end end end
Version data entries
7 entries across 7 versions & 1 rubygems