README.md in transitions-1.0.0 vs README.md in transitions-1.0.1
- old
+ new
@@ -55,11 +55,11 @@
end
end
end
```
In this example we assume that you are in a rails project using Bundler, which
-would automatically require `transitions`. If this is not the case for you you
+would automatically require `transitions`. If this is not the case then you
have to add
```ruby
require 'transitions'
```
@@ -67,11 +67,11 @@
**Known limitations:**
* You can only use one state machine per model. While in theory you can
define two or more, this won't work as you would expect. Not supporting
- this was intentional, if you're interested in the ratione look up version
+ this was intentional, if you're interested in the rational look up version
0.1.0 in the CHANGELOG.
* Use symbols, not strings for declaring the state machine. Using strings is
**not** supported as is using whitespace in names (because `transitions`
possibly generates methods out of this).
@@ -104,17 +104,17 @@
events will modify the `state` attribute on successful transition, but only
the bang(!)-version will call `save!`. The `can_discontinue?` method will not
modify state but instead returns a boolean letting you know if a given
transition is possible.
-In addition, a `can_transition?` method is added to the object that expects one or more event names as arguments. This semi-verbose method name is used to avoid collission with [https://github.com/ryanb/cancan](the authorization gem CanCan).
+In addition, a `can_transition?` method is added to the object that expects one or more event names as arguments. This semi-verbose method name is used to avoid collisions with [https://github.com/ryanb/cancan](the authorization gem CanCan).
```ruby
>> Product.new.can_transition? :out_of_stock
=> true
```
-If you need to get all available transitions for current state you can simply call:
+If you need to get all available transitions for the current state you can simply call:
```ruby
>> Product.new.available_transitions
=> [:discontinued, :out_of_stock]
```
@@ -286,9 +286,14 @@
end
```
Any arguments passed to the event method will be passed on to the `guard`
predicate.
+
+Note that guards will **not** raise on failure on their own. This means that if you want to
+treat the failure of a guard exceptional you'll need to raise an exception yourself explicitly
+in that guard (see [here](https://github.com/troessner/transitions/issues/149) for the
+corresponding discussion).
#### Timestamps
If you'd like to note the time of a state change, Transitions comes with