module Cuprum::Rails::Controller
Provides a DSL for defining actions and responses.
@example Defining A Controller
class ExampleController < ApplicationController include Cuprum::Rails::Controller responder :html, CustomHtmlResponder action :process, ExampleProcessAction end
@example Defining A RESTful Controller
class BooksController include Cuprum::Rails::Controller responder :html, Cuprum::Rails::Responders::Html::PluralResource action :index, Cuprum::Rails::Actions::Index action :show, Cuprum::Rails::Actions::Show, member: true action :published, Books::Published action :publish, Books::Publish, member: true end
Private Class Methods
included(other)
click to toggle source
Calls superclass method
# File lib/cuprum/rails/controller.rb, line 41 def included(other) super other.extend(Cuprum::Rails::Controllers::ClassMethods::Actions) other.extend(Cuprum::Rails::Controllers::ClassMethods::Configuration) other.extend(Cuprum::Rails::Controllers::ClassMethods::Validations) end