Module: TransitionButtons
- Defined in:
- lib/transition_buttons.rb,
lib/transition_buttons/railtie.rb,
lib/transition_buttons/routing.rb,
lib/transition_buttons/version.rb,
lib/transition_buttons/controller.rb,
lib/transition_buttons/view_helper.rb,
lib/transition_buttons/configuration.rb,
lib/transition_buttons/event_resolver.rb,
lib/transition_buttons/authorizers/action_policy.rb,
lib/transition_buttons/state_machine_adapters/state_machines.rb
Overview
Authorization-aware state machine transition buttons for Rails.
Renders one button per event the current user may perform on a record (the
intersection of "legal from the current state" and "authorized for this
user"), each POSTing to a member transition route that re-checks both
server-side before firing.
Defined Under Namespace
Modules: Authorizers, Routing, StateMachineAdapters, Transitionable, ViewHelper Classes: Configuration, Error, EventResolver, Railtie
Constant Summary collapse
- VERSION =
"0.0.1"
Class Method Summary collapse
- .config ⇒ Object
- .configure {|config| ... } ⇒ Object
-
.reset_config! ⇒ Object
Test/reset hook.
Class Method Details
.config ⇒ Object
19 20 21 |
# File 'lib/transition_buttons.rb', line 19 def config @config ||= Configuration.new end |
.configure {|config| ... } ⇒ Object
23 24 25 |
# File 'lib/transition_buttons.rb', line 23 def configure yield config end |
.reset_config! ⇒ Object
Test/reset hook.
28 29 30 |
# File 'lib/transition_buttons.rb', line 28 def reset_config! @config = Configuration.new end |