state_attr 0.1.9 → 0.1.10

Sign up to get free protection for your applications and to get access to all the features.
@@ -40,6 +40,7 @@ module StateAttr
40
40
 
41
41
  # if allowed switch to given state, if not raise exception
42
42
  def switch(state)
43
+ state = state.try(:to_sym)
43
44
  if (allowed?(state))
44
45
  write_state(state)
45
46
  elsif @options[:switch_not_allowed] == :silent
data/state_attr.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "state_attr"
3
- s.version = "0.1.9"
3
+ s.version = "0.1.10"
4
4
  s.date = "2011-05-16"
5
5
  s.summary = "Minimalistic state machine approach allowing multiple state attributes at the same time."
6
6
  s.email = "mpapis@gmail.com"
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: state_attr
3
3
  version: !ruby/object:Gem::Version
4
- hash: 9
4
+ hash: 15
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 9
10
- version: 0.1.9
9
+ - 10
10
+ version: 0.1.10
11
11
  platform: ruby
12
12
  authors:
13
13
  - Michal Papis