Skip to content

Commit

Permalink
Update the attr_reader to match the convention
Browse files Browse the repository at this point in the history
  • Loading branch information
a14m authored and Anil Kumar Maurya committed Jan 3, 2019
1 parent cfb5479 commit 7bdf3ea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/aasm/errors.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ module AASM
class UnknownStateMachineError < RuntimeError; end

class InvalidTransition < RuntimeError
attr_reader :object, :event_name, :originating_state, :failures, :state_machine
attr_reader :object, :event_name, :originating_state, :failures, :state_machine_name

def initialize(object, event_name, state_machine_name, failures = [])
@object, @event_name, @originating_state, @failures = object, event_name, object.aasm(state_machine_name).current_state, failures
@state_machine = state_machine_name
@state_machine_name = state_machine_name
super("Event '#{event_name}' cannot transition from '#{originating_state}'.#{reasoning}")
end

Expand Down

0 comments on commit 7bdf3ea

Please sign in to comment.