class AasmActionable::StateAction

A StateAction groups together the various attributes for an action being rendered, such as it’s title, HTML ID, and the name of the partial to render.

Note that the HTML ID is not unique, so it is not currently possible to call render_state_actions multiple times for the same taskable type on one page.

@author Brendan MacDonell

Attributes

id[R]
partial[R]
title[R]

Public Class Methods

new(event, action_view_prefix) click to toggle source
# File lib/aasm_actionable/controller_mixin.rb, line 14
def initialize(event, action_view_prefix)
  @title = event.to_s.titleize
  @id = "action-#{event}"
  @partial = "#{action_view_prefix}/#{event}"
end