Skip to content

Commit

Permalink
Merge pull request #177 from jdguzman/jd/fix/remove-activerecord-depe…
Browse files Browse the repository at this point in the history
…ndency

Remove explicit ActiveRecord dependency
  • Loading branch information
troessner committed Nov 7, 2016
2 parents 1d44791 + 80f84f2 commit f4e593e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions .todo.reek
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ InstanceVariableAssumption:
ManualDispatch:
exclude:
- Transitions::Event#default_timestamp_name
- Transitions::Event#error_message_for_invalid_transitions
- Transitions::Machine#fire_event
- Transitions::Machine#handle_event_failed_callback
- Transitions::Machine#handle_event_fired_callback
Expand Down
2 changes: 1 addition & 1 deletion lib/transitions/event.rb
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def build_success_callback(callback_names)

def error_message_for_invalid_transitions(obj)
"Can't fire event `#{name}` in current state `#{obj.current_state}` for `#{obj.class.name}`"\
" #{obj.class < ActiveRecord::Base && obj.persisted? ? "with ID #{obj.id} " : nil}"
" #{obj.respond_to?(:id) ? "with ID #{obj.id} " : nil}"
end
end
end

0 comments on commit f4e593e

Please sign in to comment.