Skip to content
This repository has been archived by the owner on May 18, 2021. It is now read-only.

Commit

Permalink
Merge 84e8171 into 57544ce
Browse files Browse the repository at this point in the history
  • Loading branch information
jbmeerkat committed May 28, 2013
2 parents 57544ce + 84e8171 commit 42b3a09
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/inputs/state_event_input.rb
@@ -1,6 +1,8 @@
class StateEventInput < SimpleForm::Inputs::CollectionSelectInput
def collection
object.send("state_transitions")
clean_attribute_name = attribute_name.to_s.gsub '_event', ''
transitions = "#{clean_attribute_name}_transitions"
object.send(transitions).map { |t| [t.human_event, t.event] }
end

def input
Expand Down

0 comments on commit 42b3a09

Please sign in to comment.