Module: Maquina::Resourceful
- Extended by:
- ActiveSupport::Concern
- Included in:
- ApplicationController
- Defined in:
- app/controllers/concerns/maquina/resourceful.rb
Overview
The Resourceful concern provides RESTful controller actions and helper methods for Rails controllers. It implements common CRUD operations and follows Rails conventions while allowing customization of actions, attributes, and policies.
Example:
class PlansController < ApplicationController
resourceful(
resource_class: Plan,
form_attributes: [{name: {type: :input}}],
list_attributes: [:name, :price],
policy_class: PlanPolicy
)
end
Defined Under Namespace
Classes: ResourceResponse