Sha256: 23f1ae1b425e325e41d61a6c07f81acfc4132846b2cbf8cd2621de91494587b6
Contents?: true
Size: 856 Bytes
Versions: 9
Compression:
Stored size: 856 Bytes
Contents
module Hippo module API class GenericController < ControllerBase def show perform_retrieval end def create record = model.from_attribute_data(data, current_user) options = build_reply_options.merge(success: record.save) std_api_reply(:create, record, options) end def update if params[:id] perform_single_update elsif data.is_a?(Array) perform_multiple_updates end end def destroy if params[:id] perform_single_destroy elsif data.is_a?(Array) perform_multiple_destroy end end end end end
Version data entries
9 entries across 9 versions & 1 rubygems