Module: RESTFramework

Defined in:
lib/rest_framework/version.rb,
lib/rest_framework.rb

Overview

Do not use Rails-specific helper methods here (e.g., ‘blank?`) so the module can run standalone.

Defined Under Namespace

Modules: BaseControllerMixin, BaseModelControllerMixin, BulkCreateModelMixin, BulkDestroyModelMixin, BulkModelControllerMixin, BulkUpdateModelMixin, ControllerMixins, CreateModelMixin, DestroyModelMixin, Generators, ListModelMixin, ModelControllerMixin, ReadOnlyModelControllerMixin, ShowModelMixin, UpdateModelMixin, Utils, Version Classes: ActiveModelSerializerAdapterFactory, BaseFilter, BasePaginator, BaseSerializer, Config, Engine, Error, ModelFilter, ModelOrderingFilter, ModelSearchFilter, NativeSerializer, NilPassedToAPIResponseError, PageNumberPaginator

Constant Summary collapse

BUILTIN_ACTIONS =
{
  index: :get,
  new: :get,
  create: :post,
}.freeze
BUILTIN_MEMBER_ACTIONS =
{
  show: :get,
  edit: :get,
  update: [:put, :patch].freeze,
  destroy: :delete,
}.freeze
RRF_BUILTIN_ACTIONS =
{
  options: :options,
}.freeze
RRF_BUILTIN_BULK_ACTIONS =
{
  update_all: [:put, :patch].freeze,
  destroy_all: :delete,
}.freeze
VERSION =
Version.get_version

Class Method Summary collapse

Class Method Details

.configObject



38
39
40
# File 'lib/rest_framework.rb', line 38

def self.config
  return @config ||= Config.new
end

.configure {|self.config| ... } ⇒ Object

Yields:



42
43
44
# File 'lib/rest_framework.rb', line 42

def self.configure
  yield(self.config)
end