module Garage
Public: include this module to make the resource authorizable in Garage::RestfulActions
Examples
class Post include Garage::Authorizable def build_permissions(perms, other); end def self.build_permissions(perms, other, target); end end
Public: proxy object to handle model Class as a resource
Public: mixes in CRUD controller actions to your Action Controller classes to provide a simple RESTful actions that provides resource-based permissions with built-in integrations with Doorkeeper scopes.
Examples
class PostsController < ApiController include Garage::RestfulActions def require_resources @resources = Post.all end def require_resource @resource = Post.find(params[:id]) end end
Constants
- VERSION
Public Class Methods
configuration()
click to toggle source
# File lib/garage/config.rb, line 8 def self.configuration @config ||= configure {} end
configure(&block)
click to toggle source
# File lib/garage/config.rb, line 4 def self.configure(&block) @config = Config::Builder.new(&block).build end