happy_path 0.0.6 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MzFmNWRlY2M5YjI0ZWMxODU2ODgwYzMxZTk3NTA5YmMzNTZiZThhNw==
4
+ ODU5MjRmMWI1NDI5YzdiMGYxYjMwOTE5M2RiODA5NDE1YTQzYTQ2Ng==
5
5
  data.tar.gz: !binary |-
6
- ZDM2NTQ3Y2UyNGE1NzBmNmEzMzUwOTFkMjMwNGZiODc3MmFjNDc0Yw==
6
+ MGU5ZjM4MGU2MDU4ODJmZjBlZGEyMDhiYTJiYWVmMTM1M2Y1NjI4NA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- OWZiOTc3YzdjNjRlNjFlOTdmMzgzMWIyNWNkMzE2M2FmZTE2Y2IxNzI2ODEy
10
- ZWUxYzU3ZmFkY2M3NWJjYjI4ZDM1NDk2ZTNmMmY3MmE5OTg3MTIxN2Y0ZjNm
11
- NjNmYmY3NzI1YTZkY2IyNTg4NTRlMjZmYzNkNzgyOWE4NzY5ZjA=
9
+ M2JmMTUwYzgxYzZhMzk4YmVhMmFhODJhOTkyOWZjNTFiZGVkOWE4OTJhZTQz
10
+ NDBhOGVmMTg4NTM1ZjhhYTg5ZmNhMzZkOTIwZjBkOTk0NDAxYTgxM2U1MGIx
11
+ NmUyNTkwMzMxMmNiNjY1OTZmYjQ4MTg1ZWIzNjUyYWQ2NGJhNzg=
12
12
  data.tar.gz: !binary |-
13
- ZGM4YTk0YzkyNjdmZDJlNmQ0NTY3ZTI5MGMwZmJlMjIyYTU0MTRmMzBmYmEz
14
- YjNhYWMwODg5MDQ5OTdiZjJjNzUxYzViOGQ4ZWEwZWFhMDc2YTZkZjlkNjA4
15
- MzA2YmI0YWJlMGI2MTU5YTViZWJjOTY4ZWJmY2ZiNDM0YmQ3OWU=
13
+ Y2M2NzQ0N2UzOThlZGFhNTczNzg3MTUwOTJkMTdkMTE3OGVjOGVjNjQ5MWMz
14
+ NTMwMzIwYWMzMmE5YTY1ZDk1MDk1MzA5YmY4ZTcyNjZhYmRlODg2ZGYwNjM4
15
+ ZjBjNTg1NDBhYTY2MTE3YTBlZThkMDZlNWE0ZDEwMjA0YzY0ZjM=
data/lib/happy_path.rb CHANGED
@@ -3,7 +3,8 @@ module HappyPath
3
3
 
4
4
  def setup_happy_path
5
5
  rescue_from ActiveRecord::RecordNotFound do |e|
6
- raise e unless controller_name.classify.constantize rescue nil && self.respond_to?(:happy_paths) && HappyPath::PATHS.include?(params[:id]) && !class_constant.count.zero?
6
+ class_constant = controller_name.classify.constantize rescue nil
7
+ raise e unless class_constant && self.respond_to?(:happy_paths) && HappyPath::PATHS.include?(params[:id]) && !class_constant.count.zero?
7
8
  self.happy_paths(e, class_constant)
8
9
  end
9
10
  end
@@ -1,3 +1,3 @@
1
1
  module HappyPath
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: happy_path
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - danReynolds