Class: Wallaby::ResourcesController

Inherits:
Object
  • Object
show all
Includes:
ResourcesConcern
Defined in:
app/controllers/wallaby/resources_controller.rb

Overview

Resources controller is the superclass for all customization controllers. It can be used for both Admin Interface and general purpose.

It contains typical resourceful action template methods that can be overridden by subclasses when customizing:

And it also contains resource related helper methods, e.g.:

For better practice, please create an application controller class (see example) to better control the functions shared between different resource controllers.

Examples:

Create an application class for Admin Interface usage

class Admin::ApplicationController < Wallaby::ResourcesController
  base_class!
end

Constant Summary

Constants included from Prefixable

Prefixable::MAPPING_ACTIONS

Method Summary

Methods included from ResourcesConcern

#create, #destroy, #edit, #home, #index, #new, #show, #update

Methods included from Servicable

#current_servicer

Methods included from Resourcable

#collection, #create_params, #current_model_class, #current_resources_name, #new_resource, #resource, #resource_id, #resource_params, #update_params

Methods included from Paginatable

#current_paginator, #paginate, #pagination_params_for

Methods included from Prefixable

#wallaby_prefixes

Methods included from Decoratable

#current_decorator, #current_fields, #current_model_decorator, #decorate, #decorator_of, #extract

Methods included from Configurable

#wallaby_controller

Methods included from Authorizable

#authorized?, #current_authorizer, #unauthorized?