module Fakecrm::CustomTypes
Public Class Methods
included(base)
click to toggle source
# File lib/fakecrm/server/custom_types.rb, line 5 def self.included(base) base.class_eval do get '/crm/api/custom_types.?:format?' do fetch_many(CustomType) end get '/crm/api/custom_types/:id.?:format?' do |id, format| fetch_one(CustomType, id) end put '/crm/api/custom_types/:id.?:format?' do |id, format| update_one(CustomType, id, params["custom_type"]) end post '/crm/api/custom_types.?:format?' do create_one(CustomType, params["custom_type"]) end delete '/crm/api/custom_types/:id.?:format?' do |id, format| destroy_one(CustomType, id) end end end